Ejemplo n.º 1
0
 public function __construct(View $view, $settings = array())
 {
     parent::__construct($view, $settings);
     foreach ($this->uses as $model) {
         $this->{$model} = ClassRegistry::init($model);
     }
 }
Ejemplo n.º 2
0
 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');
 }
Ejemplo n.º 3
0
 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);
             };
         }
     }
 }
Ejemplo n.º 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')) . '\'');
 }
Ejemplo n.º 5
0
 function __construct($params = "")
 {
     parent::__construct($params);
     /**
      * Salva configurações desta paginação
      */
 }
Ejemplo n.º 6
0
 public function __construct($obj)
 {
     parent::__construct($obj);
     $this->fc = FrontController::getInstance();
     $this->error = '';
     $this->isLoggedIn = $this->isLoggingOut = false;
 }
Ejemplo n.º 7
0
 public function __construct($View = null, $settings = array())
 {
     if (class_exists('Packages')) {
         Packages::initialize($this, __CLASS__);
     }
     parent::__construct($View, $settings);
 }
Ejemplo n.º 8
0
 public function __construct($databasename)
 {
     try {
         parent::__construct($databasename);
     } catch (Exception $e) {
         echo $e->errorMessage();
     }
 }
Ejemplo n.º 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 />';
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 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');
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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_');
 }
Ejemplo n.º 16
0
 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);
     };
 }
Ejemplo n.º 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;
         }
     }
 }
Ejemplo n.º 18
0
 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_');
         }
     }
 }
Ejemplo n.º 19
0
 public function __construct()
 {
     $this->base_folder = 'helpers/view/';
     $this->base_tpl = 'view.tpl';
     parent::__construct();
 }
Ejemplo n.º 20
0
 function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 21
0
 /**
  * Constructor
  *
  */
 public function __construct($view)
 {
     $this->Settings = ClassRegistry::getObject('Setting');
     parent::__construct($view);
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 26
0
 public function __construct($obj = null)
 {
     parent::__construct($obj);
     // $this->fc = FrontController::getInstance();
 }
Ejemplo n.º 27
0
 public function __construct()
 {
     $this->base_folder = 'helpers/form/';
     $this->base_tpl = 'form.tpl';
     parent::__construct();
 }
Ejemplo n.º 28
0
 public function __construct()
 {
     $this->base_folder = 'helpers/list/';
     $this->base_tpl = 'list.tpl';
     parent::__construct();
 }
Ejemplo n.º 29
0
 public function __construct()
 {
     $this->base_folder = 'helpers/calendar/';
     $this->base_tpl = 'calendar.tpl';
     parent::__construct();
 }
Ejemplo n.º 30
0
 public function __construct()
 {
     $this->base_folder = 'helpers/options/';
     $this->base_tpl = 'options.tpl';
     parent::__construct();
 }