Beispiel #1
0
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     foreach ($this->uses as $model) {
         $this->{$model} = ClassRegistry::init($model);
     }
 }
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $View->element('Pannel.blocks/title');
     $View->element('Pannel.blocks/user');
     $View->element('Pannel.blocks/menu');
 }
 public function __construct($client, $resource_type, $path, $hash = null)
 {
     Helper::__construct();
     $that =& $this;
     // fix exceptional resource types
     if (array_key_exists($singular = self::get_singular($resource_type), $this->INCONSISTENT_RESOURCE_TYPES)) {
         $resource_type = $this->INCONSISTENT_RESOURCE_TYPES[$singular];
     }
     $this->client = $client;
     $this->resource_type = $resource_type;
     $this->path = $path;
     $this->resources = array();
     $this->methods->index = function ($params = null) use(&$that, &$client, $resource_type, $path) {
         if ($resource_type == "session") {
             list($resource_type, $path, $hash) = $client->do_get($path, $params);
             return new ResourceDetail($client, $resource_type, $path, $hash);
         }
         list($resource_type, $path, $hash) = $client->do_get($path, $params);
         $that->resources = Resource::process($client, $resource_type, $path, $hash);
         return $that;
     };
     $this->methods->create = function ($params = null) use(&$client, $path) {
         return $client->do_post($path, $params);
     };
     if (isset($this->RESOURCE_SPECIAL_ACTIONS[$resource_type])) {
         foreach ($this->RESOURCE_SPECIAL_ACTIONS[$resource_type] as $meth => $action) {
             $action_path = Helper::insert_in_path($path, $meth);
             $this->methods->{$meth} = function ($params = null) use(&$client, $action, $action_path) {
                 return $client->{$action}($action_path, $params);
             };
         }
     }
 }
Beispiel #4
0
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     $this->appKey = Configure::read('Pusher.credentials.appKey');
     $this->Js->buffer('var pusher = new Pusher(\'' . $this->appKey . '\');');
     $this->Js->buffer('Pusher.channel_auth_endpoint = \'' . $this->url(Configure::read('Pusher.channelAuthEndpoint')) . '\'');
 }
Beispiel #5
0
 function __construct($params = "")
 {
     parent::__construct($params);
     /**
      * Salva configurações desta paginação
      */
 }
Beispiel #6
0
 public function __construct($obj)
 {
     parent::__construct($obj);
     $this->fc = FrontController::getInstance();
     $this->error = '';
     $this->isLoggedIn = $this->isLoggingOut = false;
 }
Beispiel #7
0
 public function __construct($View = null, $settings = array())
 {
     if (class_exists('Packages')) {
         Packages::initialize($this, __CLASS__);
     }
     parent::__construct($View, $settings);
 }
Beispiel #8
0
 public function __construct($databasename)
 {
     try {
         parent::__construct($databasename);
     } catch (Exception $e) {
         echo $e->errorMessage();
     }
 }
Beispiel #9
0
 /**
  * Constructor.
  *
  * @return	void
  * @access	public
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     if (get_class($this) == 'BcHtmlHelper' || get_class($this) == 'HtmlHelper') {
         $this->_tags['checkboxmultiple'] = '<input type="checkbox" name="%s[]"%s />&nbsp;';
         $this->_tags['hiddenmultiple'] = '<input type="hidden" name="%s[]" %s />';
     }
 }
Beispiel #10
0
 /**
  * The constructor at this point initializes the
  * all the required code for Wiki Help initialization.
  */
 function __construct()
 {
     $this->isHelpInitialized = false;
     $this->localizationdata = NULL;
     $this->back_params = NULL;
     $this->script = NULL;
     parent::__construct();
 }
Beispiel #11
0
 /**
  * Constructor
  */
 public function __construct(View $View, $settings = array())
 {
     $settings = Hash::merge(array('pathWhitelist' => $this->_pathWhitelist), $settings);
     parent::__construct($View, $settings);
     $plugin = Configure::read('Site.acl_plugin');
     App::uses('AclPermission', $plugin . '.Model');
     $this->AclPermission = ClassRegistry::init($plugin . '.AclPermission');
 }
Beispiel #12
0
 /**
  * construct
  *
  * @param View $View
  */
 public function __construct(View $View)
 {
     parent::__construct($View);
     if (ClassRegistry::isKeySet('Page')) {
         $this->Page = ClassRegistry::getObject('Page');
     } else {
         $this->Page = ClassRegistry::init('Page', 'Model');
     }
 }
Beispiel #13
0
 public function __construct($label, $iso_lang, $country, $ps_version)
 {
     parent::__construct();
     $this->base_folder = 'helpers/help_access/';
     $this->tpl = $this->createTemplate('button.tpl');
     $this->label = $label;
     $this->iso_lang = $iso_lang;
     $this->country = $country;
     $this->ps_version = $ps_version;
 }
Beispiel #14
0
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     if (array_key_exists('defaultTheme', $settings) && in_array($settings['defaultTheme'], $this->themes)) {
         $this->defaultTheme = $settings['defaultTheme'];
     }
     if (array_key_exists('secure', $settings)) {
         $this->secure = filter_var($secure, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
     }
 }
Beispiel #15
0
 function __construct()
 {
     parent::__construct();
     if (Configure::read('UrlCache.pageFiles')) {
         $view =& ClassRegistry::getObject('view');
         $path = $view->here;
         if ($this->here == '/') {
             $path = 'home';
         }
         $this->_key = '_' . strtolower(Inflector::slug($path));
     }
     $this->_key = 'url_map' . $this->_key;
     $this->_cache = Cache::read($this->_key, '_cake_core_');
 }
 public function __construct($client, $resource_type, $href, $hash = null)
 {
     Helper::__construct();
     $this->client = $client;
     $this->resource_type = $resource_type;
     $this->path = $href;
     $this->hash = $hash;
     // add delete method
     $this->methods->destroy = function ($params = null) use(&$client, $href) {
         return $client->do_delete($href, $params);
     };
     // add update method
     $this->methods->update = function ($params = null) use(&$client, $href) {
         $client->do_put($href, $params);
     };
     // add show method
     $this->methods->show = function ($params = null) use(&$client, $href) {
         list($resource_type, $href, $hash) = $client->do_get($href, $params);
         return new ResourceDetail($client, $resource_type, $href, $hash);
     };
 }
Beispiel #17
0
 function __construct()
 {
     parent::__construct();
     $config = Configure::read('Recaptcha');
     if (!empty($config['enabled'])) {
         if (!empty($config['public_key'])) {
             $this->public_key = $config['public_key'];
         } else {
             die('Recaptcha needs the public key to work.  Please check your configuration');
         }
         if (!empty($config['private_key'])) {
             $this->private_key = $config['private_key'];
         } else {
             die('Recaptcha needs the private key to work.  Please check your configuration');
         }
         if (!empty($config['secure_server'])) {
             $this->secure_server = true;
         } else {
             $this->secure_server = false;
         }
     }
 }
 function __construct()
 {
     parent::__construct();
     if (Configure::read('UrlCache.pageFiles')) {
         $path = "unknown";
         $view =& ClassRegistry::getObject('view');
         if ($view) {
             $path = $view->here;
             if ($view->here == '/') {
                 $path = 'home';
             }
         }
         $this->_key = '_' . strtolower(Inflector::slug($path));
     }
     if (is_a($this, 'HtmlHelper')) {
         $this->_key = 'url_map_html' . $this->_key;
         $this->_cache = Cache::read($this->_key, '_cake_core_');
     } else {
         if (is_a($this, 'FormHelper')) {
             $this->_key = 'url_map_form' . $this->_key;
             $this->_cache = Cache::read($this->_key, '_cake_core_');
         }
     }
 }
Beispiel #19
0
 public function __construct()
 {
     $this->base_folder = 'helpers/view/';
     $this->base_tpl = 'view.tpl';
     parent::__construct();
 }
Beispiel #20
0
 function __construct()
 {
     parent::__construct();
 }
Beispiel #21
0
 /**
  * Constructor
  *
  */
 public function __construct($view)
 {
     $this->Settings = ClassRegistry::getObject('Setting');
     parent::__construct($view);
 }
Beispiel #22
0
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     if (Configure::read('UrlCache.pageFiles')) {
         $view = ClassRegistry::getObject('view');
         $path = $view->here;
         if ($this->request->here == '/') {
             $path = 'home';
         }
         $this->urlKey = '_' . strtolower(Inflector::slug($path));
     }
     $this->urlKey = 'url_map' . $this->urlKey;
     $this->urlCache = Cache::read($this->urlKey, 'core');
 }
Beispiel #23
0
 public function __construct($view)
 {
     parent::__construct($view);
     //$this->view->stylesForLayout = '';
     //$this->view->scriptsForLayout = '';
 }
 /**
  * Constructor
  *
  * @param View $View
  * @param array $settings
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     DebugTimer::start('viewRender', __d('debug_kit', 'Rendering View'));
 }
 /**
 *
 *class constructor ,checks from database whether email exists or not.
 *
 *@param string $databasename
 *
 */
 public function __construct($databasename)
 {
     parent::__construct($databasename);
 }
Beispiel #26
0
 public function __construct($obj = null)
 {
     parent::__construct($obj);
     // $this->fc = FrontController::getInstance();
 }
Beispiel #27
0
 public function __construct()
 {
     $this->base_folder = 'helpers/form/';
     $this->base_tpl = 'form.tpl';
     parent::__construct();
 }
Beispiel #28
0
 public function __construct()
 {
     $this->base_folder = 'helpers/list/';
     $this->base_tpl = 'list.tpl';
     parent::__construct();
 }
Beispiel #29
0
 public function __construct()
 {
     $this->base_folder = 'helpers/calendar/';
     $this->base_tpl = 'calendar.tpl';
     parent::__construct();
 }
Beispiel #30
0
 public function __construct()
 {
     $this->base_folder = 'helpers/options/';
     $this->base_tpl = 'options.tpl';
     parent::__construct();
 }