public function __construct() { parent::__construct(); $tpl = new Mtpl(array('M/Office/Templates/', APP_ROOT . 'app/' . APP_NAME . '/templates/', APP_ROOT . 'public/themes/' . Config::getPref('theme') . '/templates/')); $this->assign('output', $tpl->fetch('home')); $this->assign('__action', 'dyn'); }
/** * * Constructor * * @param $key string Google maps key */ public function __construct($key = null) { if (is_null($key)) { $this->key = Config::getPref('gmap_key'); } else { $this->key = $key; } }
public function setup() { M_Office_Util::$mainOptions = PEAR::getStaticProperty('m_office', 'options'); M::addPaths('module', array(APP_ROOT . 'app/_shared/modules/', APP_ROOT . 'app/' . APP_NAME . '/modules/', 'M/Office/modules/')); M::addPaths('template', array(OFFICE_TEMPLATES_FOLDER, APP_ROOT . 'app/_shared/templates/', APP_ROOT . 'app/' . APP_NAME . '/templates/')); if (Config::getPref('theme')) { M::addPaths('template', array(APP_ROOT . 'public/themes/' . Config::getPref('theme') . '/templates/')); } $tpl = new Mtpl(M::getPaths('template')); $tpl->assign('jsdir', SITE_URL . 'js/'); Mreg::set('tpl', $tpl); }
public function executeMigrate($params = array()) { $option = array_shift($params); if ($option != 'reset') { $migration_date = Config::getPref('migration_date', false); } if (empty($migration_date) && $option != 'reset') { return $this->error('No migration date. If you want to reinstall all the migrations add reset to your command'); } $this->line('migrating database changes since ' . $migration_date); $new_migration_date = date('YmdHi'); foreach (self::_migrations() as $date => $info) { $this->line('Check ' . $date . ' : ' . $info['description']); if ($date > $migration_date) { self::_launch_migration($info, $info['type']); Config::setPref('migration_date', $date); } else { $this->line('DONE'); } } }