function init() { parent::init(); if (@$_GET[$this->owner->name . '_cut_field'] == $this->name) { $this->api->addHook('pre-render', array($this, '_cutField')); } }
function init() { parent::init(); $this->template->set('slot1', rand(1, 9)); $this->template->set('slot2', rand(1, 9)); $this->template->set('slot3', rand(1, 9)); }
function init() { parent::init(); $this->grabTemplateChunk('link'); $this->grabTemplateChunk('prev'); $this->grabTemplateChunk('cur_item'); $this->grabTemplateChunk('separator'); $this->grabTemplateChunk('next'); $this->skip = $this->learn('skip', @$_GET[$this->name . '_skip']) + 0; $this->api->addHook('pre-exec', array($this, 'applyHook'), 1); }
function init() { $this->api->page_object = $this; if ($this->owner != $this->api && !$this->owner instanceof BasicAuth) { throw $this->exception('Do not add page manually. Page is automatically initialized by the Application class')->addMoreInfo('owner', $this->owner->name)->addMoreInfo('api', $this->api->name); } $this->template->trySet('_page', $this->short_name); if (method_exists($this, get_class($this))) { throw $this->exception('Your sub-page name matches your page class name. PHP will assume that your method is constructor.')->addMoreInfo('method and class', get_class($this)); } parent::init(); }
function init() { $this->api->page_object = $this; if ($this->owner != $this->api && !$this->owner instanceof BasicAuth) { throw $this->exception('Do not add page manually. Page is automatically initialized by the Application class')->addMoreInfo('owner', $this->owner->name)->addMoreInfo('api', $this->api->name); } if (isset($_GET['cut_page']) && !isset($_GET['cut_object']) && !isset($_GET['cut_region'])) { $_GET['cut_object'] = $this->short_name; } $this->template->trySet('_page', $this->short_name); parent::init(); }
function init() { /** * During form initialization it will go through it's own template and search for lots of small template * chunks it will be using. If those chunk won't be in template, it will fall back to default values. This way * you can re-define how form will look, but only what you need in particular case. If you don't specify template * at all, form will work with default look. */ parent::init(); $this->getChunks(); // After init method have been executed, it's safe for you to add controls on the form. BTW, if // you want to have default values such as loaded from the table, then intialize $this->data array // to default values of those fields. $this->api->addHook('pre-exec', array($this, 'loadData')); $this->api->addHook('pre-render-output', array($this, 'lateSubmit')); }
function init() { parent::init(); if (@$_GET[$this->owner->name . '_cut_field'] == $this->name) { $this->app->addHook('pre-render', array($this, '_cutField')); } /** TODO: finish refactoring // find the form $obj=$this->owner; while(!$obj instanceof Form){ if($obj === $this->app)throw $this->exception('You must add fields only inside Form'); $obj = $obj->owner; } $this->setForm($obj); */ }
function init() { $this->app->page_object = $this; $this->template->trySet('_page', $this->short_name); if (method_exists($this, get_class($this))) { throw $this->exception('Your sub-page name matches your page class name. PHP will assume that your method is constructor.')->addMoreInfo('method and class', get_class($this)); } if ($this->app instanceof App_Frontend && @$this->app->layout && $this->app->layout->template->hasTag('page_title')) { $this->app->addHook('afterInit', array($this, 'addBreadCrumb')); } if ($this->app instanceof App_Frontend && $this->app->template->hasTag('page_metas')) { $this->app->addHook('afterInit', array($this, 'addMetas')); } if ($this->app instanceof App_Frontend && $this->app->template->hasTag('page_title')) { $this->app->addHook('afterInit', array($this, 'addTitle')); } parent::init(); }
function init() { parent::init(); $this->facebook = new Facebook(array('appId' => $this->api->getConfig('appId'), 'secret' => $this->api->getConfig('secret'))); // Get User ID $this->user = $this->facebook->getUser(); // We may or may not have this data based on whether the user is logged in. // // If we have a $this->user id here, it means we know the user is logged into // Facebook, but we don't know if the access token is valid. An access // token is invalid if the user logged out of Facebook. if ($this->user) { try { // Proceed knowing you have a logged in user who's authenticated. $user_profile = $this->facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $this->user = null; } } $this->loginUrl = $this->facebook->getLoginUrl(array('scope' => $this->api->getConfig('permissions'))); $this->logoutUrl = $this->facebook->getLogoutUrl(); }
function init() { parent::init(); $this->setModel('helloworld/Test'); }
function init() { parent::init(); $this->api->addHook("pre-render", array($this, "preRender")); }
function init() { parent::init(); }
function init() { parent::init(); $this->message = 'Hello world'; }
function init() { parent::init(); $this->js(true)->fileupload($this->options); }
function init() { parent::init(); $this->setModel('BlogPost'); }