public function init() { // base init parent::init(); // build menu $menuItemArray = array(); $moduleArray = \Model\Module::find(); foreach ($moduleArray as $module) { $menuItemArray[] = array('label' => $module->name, 'link' => ROOT . $module->adminUrl, 'active' => false); } $this->view->menuItemArray = $menuItemArray; }
/** {@inheritdoc} */ public function getSchemaFilename() { return \Model\Module::getPath('data/RelaxNG/PackageMetadata.rng'); }
$router->add("/admin/" . $blockHandle . "/delete/{handle}/", $indexControllerData); // public website $indexControllerData = array('controller' => 'public', 'action' => 'index', 'namespace' => $blockNamespace . '\\Controller'); $router->add("/", $indexControllerData); $router->add("/" . $blockHandle, $indexControllerData); $router->add("/" . $blockHandle . "/", $indexControllerData); //////////////////////////// // CLASSES $loaderClassArray[$blockNamespace . '\\Controller\\AdminControllerCore'] = ABS_ROOT . CORE_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/controllers/AdminControllerCore.php'; $loaderClassArray[$blockNamespace . '\\Controller\\AdminController'] = ABS_ROOT . PROJ_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/controllers/AdminController.php'; $loaderClassArray[$blockNamespace . '\\Controller\\PublicControllerCore'] = ABS_ROOT . CORE_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/controllers/PublicControllerCore.php'; $loaderClassArray[$blockNamespace . '\\Controller\\PublicController'] = ABS_ROOT . PROJ_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/controllers/PublicController.php'; $loaderClassArray[$blockNamespace . '\\Object\\FooCore'] = ABS_ROOT . CORE_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/php/objects/FooCore.php'; $loaderClassArray[$blockNamespace . '\\Object\\Foo'] = ABS_ROOT . PROJ_FOLDER . '/' . $blockVendor . '/' . $blockFolder . '/php/objects/Foo.php'; $loaderClassArray['Model\\PageCore'] = ABS_ROOT . CORE_FOLDER . '/' . $blockAuthor . '/' . $blockFolder . '/models/PageCore.php'; $loaderClassArray['Model\\Page'] = ABS_ROOT . PROJ_FOLDER . '/' . $blockAuthor . '/' . $blockFolder . '/models/Page.php'; //////////////////////////// // AUTOLOAD FOLDERS $loaderDirArray[] = '../../' . $blockFolder . '/models/'; $loaderDirArray[] = '../../' . $blockFolder . '/php/objects/'; //////////////////////////// // AUTOLOAD NAMESPACES // $loaderNamespaceArray['BlockModule\Pages'] = "../../".$blockFolder."/php/objects/"; //////////////////////////// // REFRESH if (SERVER == 'dev' && isset($_GET['refreshAll'])) { //////////////////////////// // REGISTER MENU ITEM $moduleData = array('uid' => 'proto-pages', 'name' => 'Pages', 'adminUrl' => 'admin/pages/', 'publicUrl' => ''); \Model\Module::register($moduleData); }
/** * Load dataset from data/Test/Classname[/$testName].yaml * * @param string $testName Test name. If NULL, the fixture dataset for the test class is loaded. * @return \PHPUnit_Extensions_Database_DataSet_IDataSet */ protected function _loadDataSet($testName = null) { $class = $this->_getClass(); $class = substr($class, strpos($class, '\\')); // Remove 'Model' prefix $file = str_replace('\\', '/', "data/Test{$class}"); if ($testName) { $file .= "/{$testName}"; } return new \PHPUnit_Extensions_Database_DataSet_YamlDataSet(\Model\Module::getPath("{$file}.yaml")); }