Skip to content

Instantly share code, notes, and snippets.

@uabassguy
uabassguy / Table.php
Last active August 29, 2015 14:26 — forked from IvanChepurnyi/Table.php
Optimized options load
<?php
/**
* Optimized version of attribute source options model
*
* That allows to preload options once and reuse them instead of doing calls to db all the time
*
*/
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table
extends Mage_Eav_Model_Entity_Attribute_Source_Table
(declare -a tt && tt=( app/design app/code app/etc skin/frontend ) &&\
for t in "${tt[@]}"; do tree -fi -L 3 --noreport $t | awk 'NR > 2 { print $0 " " $0 }'; done)\
> modman