__construct() public method

public __construct ( $view )
コード例 #1
0
 public function __construct(View $View, $settings = [])
 {
     if (isset($settings['prefix'])) {
         $this->prefix = $settings['prefix'];
         unset($settings['prefix']);
     }
     parent::__construct($View, $settings);
 }
コード例 #2
0
ファイル: DataTableHelper.php プロジェクト: bokac1984/genije
 /**
  * Constructor
  *
  * @param View $View The View this helper is being attached to.
  * @param array $settings Configuration settings for the helper.
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     if (isset($this->_View->viewVars['dtColumns'])) {
         foreach ($this->_View->viewVars['dtColumns'] as $config => $columns) {
             $this->_parseSettings($config, $columns);
         }
     }
 }
コード例 #3
0
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     if (!empty($settings['configFile'])) {
         $this->loadConfig($settings['configFile']);
     } else {
         $this->loadConfig('TwitterBootstrap.html5_tags');
     }
 }
コード例 #4
0
ファイル: thumbnail.php プロジェクト: atikahmed/joomla-probid
 function __construct()
 {
     if (!class_exists('PhpThumbFactory')) {
         App::import('Vendor', 'phpthumb' . DS . 'ThumbLib.inc');
     }
     $this->path = PATH_ROOT . _JR_WWW_IMAGES;
     $this->path_tn = PATH_ROOT . _JR_WWW_IMAGES . 'jreviews' . _DS . 'tn' . _DS;
     $this->www = WWW_ROOT . _JR_WWW_IMAGES;
     $this->www_tn = $this->www . 'jreviews' . _DS . 'tn' . _DS;
     parent::__construct();
     // Make parent class vars available here, like cmsVersion
 }
コード例 #5
0
 /**
  * Constructor
  *
  * @param View $View The View this helper is being attached to.
  * @param array $settings Configuration settings for the helper.
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->settings = Hash::merge($this->settings, $settings);
     if (isset($this->_View->viewVars['dtColumns'])) {
         $dtColumns = $this->_View->viewVars['dtColumns'];
         foreach ($dtColumns as $model => $columns) {
             $this->_paginatedModels[] = $model;
             $this->_parseSettings($model, $columns);
         }
     }
 }
コード例 #6
0
ファイル: CroogoHtmlHelper.php プロジェクト: saydulk/croogo
    /**
     * Constructor
     */
    public function __construct(View $View, $settings = array())
    {
        $themeConfig = CroogoTheme::config($View->theme);
        $themeSettings = $themeConfig['settings'];
        $settings = Hash::merge($themeSettings, $settings);
        parent::__construct($View, $settings);
        $themeCss = $themeSettings['css'];
        $boxIconClass = trim($settings['iconDefaults']['classDefault'] . ' ' . $settings['iconDefaults']['classPrefix'] . 'list');
        $this->_tags['beginbox'] = "<div class='{$themeCss['row']}'>\n\t\t\t\t<div class='{$themeCss['columnFull']}'>\n\t\t\t\t\t<div class='box'>\n\t\t\t\t\t\t<div class='box-title'>\n\t\t\t\t\t\t\t<i class='{$boxIconClass}'></i>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='box-content %s'>";
        $this->_tags['endbox'] = '</div>
					</div>
				</div>
			</div>';
        $this->_tags['icon'] = '<i class="%s"%s></i>';
    }
コード例 #7
0
ファイル: CroogoHtmlHelper.php プロジェクト: Demired/CakeWX
    public function __construct(View $View, $settings = array())
    {
        parent::__construct($View, $settings);
        $this->_tags['beginbox'] = '<div class="row-fluid">
				<div class="span12">
					<div class="box">
						<div class="box-title">
							<i class="icon-list"></i>
							%s
						</div>
						<div class="box-content %s">';
        $this->_tags['endbox'] = '</div>
					</div>
				</div>
			</div>';
        $this->_tags['icon'] = '<i class="%s"%s></i> ';
    }
コード例 #8
0
    /**
     * Constructor
     */
    public function __construct(View $View, $settings = array())
    {
        if (isset($View->viewVars['themeSettings'])) {
            $themeSettings = $View->viewVars['themeSettings'];
            $settings = Hash::merge(array('iconDefaults' => $themeSettings['iconDefaults'], 'icons' => $themeSettings['icons']), $settings);
        } else {
            $croogoTheme = new CroogoTheme();
            $themeData = $croogoTheme->getData();
            $themeSettings = $themeData['settings'];
            $settings = Hash::merge($themeSettings, $settings);
        }
        parent::__construct($View, $settings);
        $themeCss = $themeSettings['css'];
        $boxIconClass = trim($settings['iconDefaults']['classDefault'] . ' ' . $settings['iconDefaults']['classPrefix'] . 'list');
        $this->_tags['beginbox'] = "<div class='{$themeCss['row']}'>\n\t\t\t\t<div class='{$themeCss['columnFull']}'>\n\t\t\t\t\t<div class='box'>\n\t\t\t\t\t\t<div class='box-title'>\n\t\t\t\t\t\t\t<i class='{$boxIconClass}'></i>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='box-content %s'>";
        $this->_tags['endbox'] = '</div>
					</div>
				</div>
			</div>';
        $this->_tags['icon'] = '<i class="%s"%s></i>';
    }
コード例 #9
0
ファイル: PHtmlHelper.php プロジェクト: parker00811/elections
 /**
  * Sets up various vars/classes required
  *
  * @return null
  * @access public
  */
 public function __construct($settings = array())
 {
     $sessionKey = 'Auth';
     if (is_array($settings) && isset($settings[0])) {
         $sessionKey = $settings[0];
     } elseif (is_string($settings)) {
         $sessionKey = $settings;
     }
     $this->sessionKey = $sessionKey;
     $this->userModel = Configure::read('Permissible.UserModelAlias');
     $user = ClassRegistry::init(Configure::read('Permissible.UserModel'));
     $this->userModelPrimary = $user->primaryKey;
     $name = Inflector::camelize(strtolower(Configure::read('Acl.classname')));
     if (!class_exists($name)) {
         if (App::import('Component', $name)) {
             list($plugin, $name) = pluginSplit($name);
             $name .= 'Component';
         } else {
             trigger_error(sprintf(__('Could not find %s.'), $name), E_USER_WARNING);
         }
     }
     $this->_Instance =& new $name();
     parent::__construct($settings);
 }
コード例 #10
0
ファイル: OvenHtmlHelper.php プロジェクト: shama/oven
 /**
  * __construct
  * @param View $View
  * @param array $settings
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->Image = new ImageHelper($View, $settings);
 }
コード例 #11
0
 function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->setVariables();
 }
コード例 #12
0
ファイル: BootStrapHtmlHelper.php プロジェクト: alescx/base
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $bootstrapTags = array('botstrap_checkboxmultiple_inline_start' => '', 'botstrap_checkboxmultiple_inlines_end' => '', 'bootstrap_checkboxmultiple_inline' => '<label class="%s" for="%s"><input type="checkbox" name="%s[]" %s />%s</label>', 'bootstrap_checkboxmultiple_block' => '<div %s><label class="%s" for="%s"><input type="checkbox" name="%s[]" %s />%s</label></div>');
     $this->_tags = array_merge($this->_tags, $bootstrapTags);
 }
コード例 #13
0
 /**
  * contruct
  * 	- allow defaults to be overridden
  * @param $settings array
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
 }
コード例 #14
0
 public function __construct(\View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $this->aclComponent = new AclComponent(new ComponentCollection());
 }
コード例 #15
0
ファイル: MiHtmlHelper.php プロジェクト: razzman/mi
 /**
  * construct method
  *
  * @param array $settings array()
  * @return void
  * @access private
  */
 public function __construct($View, $settings = array())
 {
     $this->settings = array_merge($this->settings, $settings);
     parent::__construct($View, $settings);
 }
コード例 #16
0
 /**
  * Default Constructor
  *
  * @param View $View The View this helper is being attached to.
  * @param array $settings Configuration settings for the helper.
  */
 public function __construct(View $View, $settings = array())
 {
     parent::__construct($View, $settings);
     $userConfig = Configure::check('Bs3.Html') ? Configure::read('Bs3.Html') : array();
     $this->_config = Hash::merge($this->_defaults, $userConfig);
 }
コード例 #17
0
ファイル: BaklavaHtmlHelper.php プロジェクト: 0x20h/Baklava
 public function __construct(View $View, array $settings = array())
 {
     // proxy settings to Baklava helper
     $this->helpers['Baklava.Baklava'] = array_merge($settings, array('className' => null));
     parent::__construct($View, $settings);
 }