function beforeRender() { parent::beforeRender(); if (!Configure::read('Status.allow')) { return $this->redirect($this->referer()); } }
public function beforeRender() { parent::beforeRender(); if ($this->request->action === 'admin_login') { $this->layout = 'login'; } }
/** * Model::beforeRender() callback. */ public function beforeRender() { parent::beforeRender(); $this->set('attachmentModel', $this->modelClass); $this->set('model', $this->model); $this->set('modelId', $this->modelId); }
public function beforeRender() { parent::beforeRender(); $this->set('exec_time', microtime() - $this->_startTime); $this->set('totalCount', $this->_totalCount); $this->set('successCount', $this->_successCount); }
/** * beforeRender callback * * @return void * @access public */ public function beforeRender() { parent::beforeRender(); if (in_array($this->action, array('add', 'edit', 'home'))) { $this->set('paymentMethods', array('bank' => __('Bank Account Transfer', true), 'cheque' => __('Post Office Remittance', true))); } }
function beforeRender() { parent::beforeRender(); $this->set('service_titles', $this->service_titles); $this->set('service_status', $this->service_status); $this->set('service_schedule', $this->service_schedule); }
public function beforeRender() { parent::beforeRender(); $breadcrumbs = array(array('link' => Router::url(array('controller' => 'pages', 'action' => 'index')), 'text' => __('Home'), 'active' => ''), array('link' => Router::url(array('controller' => 'condos', 'action' => 'index')), 'text' => __n('Condo', 'Condos', 2), 'active' => ''), array('link' => Router::url(array('controller' => 'condos', 'action' => 'view', $this->getPhkRequestVar('condo_id'))), 'text' => $this->getPhkRequestVar('condo_text'), 'active' => ''), array('link' => '', 'text' => __('Drafts'), 'active' => 'active')); $headerTitle = __('Drafts'); $this->set(compact('breadcrumbs', 'headerTitle')); }
public function beforeRender() { AppController::beforeRender(); $subMenu = array(array("Autorisations", array('controller' => 'Autorisation', 'action' => 'index'), $this->params['action'] == 'index'), array("Membres", array('controller' => 'Autorisation', 'action' => 'members'), $this->params['action'] == 'members')); $this->set('subMenu', $subMenu); $this->layout = 'connected'; }
public function beforeRender() { parent::beforeRender(); $this->set('section', $this->section); $this->set('CMS', Configure::read('Cms.Name')); $this->set('admin', $this->Auth->user()); }
/** * Called after the controller action is run, but before the view is rendered. * * Used to ensure that json responses are handled correctly by the action * * @link http://book.cakephp.org/view/984/Callbacks * @return void */ public function beforeRender() { parent::beforeRender(); Configure::write('debug', 0); $this->request->action = 'response'; $this->layout = false; }
function beforeRender() { parent::beforeRender(); if (strtolower(Configure::read('Newsletter.send_method')) == 'smtp' && $this->Email->smtpError) { $this->log('newsletter_smtp_errors', $this->Email->smtpError); Configure::write('Newsletter.smtp_errors', $this->Email->smtpError); } }
public function beforeRender() { parent::beforeRender(); if (!empty($this->path)) { $this->page_data['body_id'] .= '-' . implode('-', $this->path); $this->set($this->page_data); } }
function beforeRender() { parent::beforeRender(); $stateOptions = $this->User->stateOptions(); $groups = $this->Group->find('list', array('fields' => 'id,name')); $companies = $this->Company->find('list', array('fields' => 'id, name', 'permissionable' => false, 'conditions' => array('Company.history_status' => 1))); $this->set(compact('stateOptions', 'companies', 'groups')); }
public function beforeRender() { parent::beforeRender(); $breadcrumbs = array(array('link' => Router::url(array('controller' => 'pages', 'action' => 'index')), 'text' => __('Home'), 'active' => '')); if ($this->viewVars['page'] == 'login') { $breadcrumbs[1] = array('link' => '', 'text' => __('Start Session'), 'active' => 'active'); } $this->set(compact('breadcrumbs')); }
/** * Escapes the viewVars. * * @return void */ public function beforeRender() { parent::beforeRender(); foreach ($this->viewVars as $key => $value) { if (!is_object($value)) { $this->viewVars[$key] = h($value); } } }
/** * Before render. */ public function beforeRender() { parent::beforeRender(); $this->set('user', $this->Auth->user()); $this->set('userFields', $this->config['User']['fieldMap']); $this->set('userRoutes', $this->config['User']['routes']); $this->set('config', $this->config); $this->set('settings', $this->settings); }
public function beforeRender() { parent::beforeRender(); $this->set("title_for_layout", "サマリー"); if (CakeSession::check('errMsg')) { $this->set("errMsg", CakeSession::read('errMsg')); CakeSession::delete('errMsg'); } }
public function beforeRender() { parent::beforeRender(); if (isset($this->request->data['Company']['password'])) { unset($this->request->data['Company']['password']); } if (isset($this->request->data['Company']['confirm_password'])) { unset($this->request->data['Company']['confirm_password']); } }
function beforeRender() { parent::beforeRender(); // If we are dealing with ajax, no need to reselect accounts. if ($this->request->isAjax()) { return; } // Set the account list. $this->set($this->Account->getList($this->Auth->user('id'), $this->Auth->user('default_currency_id'))); }
function beforeRender() { parent::beforeRender(); if (!isset($this->viewVars['modelClass'])) { $this->set('modelClass', $this->modelClass); if (isset($this->{$this->modelClass})) { $this->set('modelDisplayField', $this->{$this->modelClass}->displayField); } } }
function beforeRender() { //パンくず設定 $this->set('breadcrumb', array(array("name" => __('Home', true), 'link' => array('controller' => 'users', 'action' => 'admin_index')))); //XML出力時にデバッグ文を出力しない if ($this->RequestHandler->isXml()) { Configure::write('debug', 0); } parent::beforeRender(); }
function beforeRender() { parent::beforeRender(); $industries = $this->Industry->find('list', array('fields' => 'id, name')); $industries = array(0 => __('Not Classified')) + $industries; $ratecards = $this->Ratecard->find('list', array('fields' => 'id, name', 'conditions' => array('Ratecard.history_status' => 1), 'order' => array('Ratecard.default DESC'))); $countries = $this->Country->find('list', array('fields' => 'id, name', 'order' => 'order desc, name asc')); $currencies = $this->Currency->find('list', array('fields' => 'id, name', 'order' => 'order desc, name asc')); $this->set(compact('countries', 'industries', 'ratecards', 'currencies')); }
public function beforeRender() { parent::beforeRender(); if ($this->loggedInUserId() != '') { $tab = 'projects'; } else { $tab = ''; } $this->set(compact('tab')); }
public function beforeRender() { parent::beforeRender(); if (in_array($this->request->action, array('admin_edit', 'admin_add'))) { $categories = $this->Widget->Category->getParents(); $sizes = $this->Widget->getSizes(); $columns = $this->Widget->getColumns(); $this->set(compact('categories', 'sizes', 'columns')); } }
function beforeRender() { parent::beforeRender(); $dateformats = array('d M Y' => 'DD MMM YYYY', 'd/m/Y' => 'DD/MM/YYYY', 'd-m-Y' => 'DD-MM-YYYY', 'd.m.Y' => 'DD.MM.YYYY', 'm/d/Y' => 'MM/DD/YYYY', 'm-d-Y' => 'MM-DD-YYYY', 'm.d.Y' => 'MM.DD.YYYY', 'Y/m/d' => 'YYYY/MM/DD', 'Y-m-d' => 'YYYY-MM-DD', 'Y.m.d' => 'YYYY.MM.DD'); $timeformats = array('g:i:s A' => '12-hour', 'H:i:s' => '24-hour'); $startWeek = array(0 => 'Sunday', 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday'); $numberFormats = array(1 => '1,234.00', 2 => '1 234.00', 3 => '1.234,00', 4 => '1 234,00'); $currencyDisplayFormats = array(1 => '$1,234.00 USD', 2 => '$1,234.00'); $sandboxtest = array('https://www.sandbox.paypal.com/cgi-bin/webscr' => __('Yes'), 'https://www.paypal.com/cgi-bin/webscr' => __('No')); $this->set(compact('dateformats', 'timeformats', 'startWeek', 'numberFormats', 'currencyDisplayFormats', 'sandboxtest')); }
public function beforeRender() { parent::beforeRender(); $this->set('imagesize', $this->imagesize); $this->set('formaction', $this->formaction); $this->set('container_model', $this->container_model); $this->set('editurl', $this->editurl); $this->set('addurl', $this->addurl); $this->set('listurl', $this->listurl); $this->set('sorturl', $this->sorturl); }
/** * beforeRender callback * * @return void * @access public * @throws */ public function beforeRender() { parent::beforeRender(); $this->_setMenu(); if (isset($this->request->params['prefix']) && $this->request->params['prefix'] == 'admin') { $this->set('title_for_layout', __d('phkapa', 'pHKapa') . ' - ' . __d('phkapa', 'Administration')); } else { $this->set('title_for_layout', __d('phkapa', 'pHKapa')); } //$this->set('pluginImage', 'Phkapa.phkapa.png'); }
function beforeRender() { parent::beforeRender(); $this->ContextMenu->addSection(__('Actions', true)); if ($this->action != 'index') { $this->ContextMenu->addLink(__('Group list', true), '/groups/index'); } if ($this->action != 'add') { $this->ContextMenu->addLink(__('Add group', true), '/groups/add'); } }
public function beforeRender() { AppController::beforeRender(); $subMenu = array(array("Licences", "/ManageLicences/licence", $this->params['action'] == 'licence'), array("Nouveaux Membres", "/ManageLicences/newMembers", $this->params['action'] == 'newMembers' || $this->params['action'] == 'memberControl')); $this->set('subMenu', $subMenu); if ($this->params['action'] == 'produceLicences' || $this->params['action'] == 'reproduceLicence') { $this->layout = 'pdf'; } else { $this->layout = 'connected'; } }
public function beforeRender() { AppController::beforeRender(); $subMenu = array(array("Membres", array('controller' => 'ManageMembers', 'action' => 'members', $this->params['pass'][0]), $this->params['action'] == 'members' || $this->params['action'] == 'addMember' || $this->params['action'] == 'uploadMembers' || $this->params['action'] == 'confirmUploadMembers' || $this->params['action'] == 'viewMember' || $this->params['action'] == 'old_members_add'), array("Licences", array('controller' => 'ManageMembers', 'action' => 'licence', $this->params['pass'][0]), $this->params['action'] == 'licence'), array("Fiche club", array('controller' => 'ManageMembers', 'action' => 'fiche', $this->params['pass'][0]), $this->params['action'] == 'fiche'), array("Historique membres", array('controller' => 'ManageMembers', 'action' => 'history_members', $this->params['pass'][0]), $this->params['action'] == 'history_members')); $this->set('subMenu', $subMenu); if ($this->params['action'] == 'download') { $this->layout = 'empty'; } else { $this->layout = 'connected'; } }