This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Am_Plugin_Dashboard extends Am_Plugin | |
| { | |
| const PLUGIN_STATUS = self::STATUS_PRODUCTION; | |
| const PLUGIN_COMM = self::COMM_COMMERCIAL; | |
| const PLUGIN_REVISION = '@@VERSION@@'; | |
| protected $_configPrefix = 'misc.'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Am_Di::getInstance()->hook->add(Am_Event::BEFORE_RENDER, function (Am_Event $e) { | |
| if (stripos($e->getTemplateName(), 'blocks/member-main-resources.phtml') !== false) { | |
| usort($e->getView()->resources, function ($a, $b) {return strtolower($a->title) <=> strtolower($b->title);}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Am_Di::getInstance()->hook->add(Am_Event::USER_MENU, function(Am_Event $e) { | |
| $menu = $e->getMenu(); | |
| $url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | |
| if ($_ = $e->getDi()->linkTable->findFirstByUrl($url)) { | |
| $menu->findOneById("link-{$_->pk()}")->setActive(true); | |
| } | |
| }); |
OlderNewer