Пример #1
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('list', 5, $args);
     $this->arg('listKey', 6, $args, 'id');
     $this->arg('labelKey', 7, $args);
 }
Пример #2
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('dateFormat', null, $args, "Y-m-d");
     $this->arg('timezone', null, $args);
     //JDate::toFormat() is deprecated. CONVERT Legacy Joomla Format
     //Minutes : ‰M > i
     $this->dateFormat = str_replace("%M", "i", $this->dateFormat);
     //remove the %
     $this->dateFormat = str_replace("%", "", $this->dateFormat);
 }
Пример #3
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('viewType', null, $args);
     $states = array('' => array('icomoon-question-sign', 'PLG_JDOM_UNDEFINED', 'both', 'default'), 1 => array('icomoon-ok', 'JYES', 'both', 'success'), 0 => array('icomoon-cancel', 'JNO', 'both', 'danger'));
     if ($this->dataValue === null) {
         $this->dataValue = '';
     }
     $state = $states[$this->dataValue];
     $this->icon = $state[0];
     $this->text = $this->JText($state[1]);
     if (empty($this->viewType)) {
         $this->viewType = $state[2];
     }
     $this->color = $state[3];
 }
Пример #4
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('indirect', null, $args, 'indirect');
     $this->arg('root', null, $args);
     $this->arg('width', null, $args, 0);
     $this->arg('height', null, $args, 0);
     $this->arg('attrs', null, $args);
     $this->arg('listKey', null, $args, 'id');
     $this->arg('view', null, $args);
     $this->arg('cid', null, $args);
     $this->thumb = $this->width || $this->height;
     if ($this->indirect === true) {
         $this->indirect = 'indirect';
     } else {
         if ($this->indirect === false) {
             $this->indirect = 'direct';
         }
     }
 }
Пример #5
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('width', null, $args);
     $this->arg('height', null, $args);
     $this->arg('markup', null, $args, 'img');
     $this->arg('src', null, $args);
     $this->arg('indirect', null, $args);
     $this->arg('root', null, $args);
     $this->arg('title', null, $args);
     $this->arg('alt', null, $args, $this->title);
     if (!$this->width || !$this->height) {
         $this->markup = 'img';
     }
     if ($this->indirect) {
         $this->src = $this->indirectUrl();
     } else {
         if ($this->root) {
             //If indirect is set, root is a marker
             $this->src = $this->fileUrl($this->root, $this->src);
         }
     }
     // Image loaded through	a class name in a simple markup (div per default)
     if ($this->domClass) {
         if ($this->markup == 'img') {
             //Change the default marker
             $this->markup = 'div';
         }
     }
     // Default IMG markup (physical image)
     if ($this->markup == 'img') {
         if ($this->src) {
             $this->addSelector('src', $this->src);
         }
         if ($this->width) {
             $this->addSelector('width', $this->width . 'px');
         }
         if ($this->height) {
             $this->addSelector('height', $this->height . 'px');
         }
         if ($this->alt) {
             $this->addSelector('alt', $this->JText($this->alt));
         }
     } else {
         if ($this->src) {
             $this->addStyle('background-image', 'url(' . $this->src . ')');
         }
         if ($this->width) {
             $this->addStyle('width', $this->width . 'px');
         }
         if ($this->height) {
             $this->addStyle('height', $this->height . 'px');
         }
         $this->addStyle('background-repeat', 'no-repeat');
         $this->addStyle('background-position', 'center');
         $this->addStyle('display', 'inline-block');
     }
     if ($this->title) {
         $this->addSelector('title', $this->JText($this->title));
     }
 }
Пример #6
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('width', 6, $args, "20");
     $this->arg('height', 7, $args, "20");
 }
Пример #7
0
 protected function parseVars($vars)
 {
     return parent::parseVars(array_merge(array('IMAGE_SOURCE' => $this->image, 'ALT' => htmlspecialchars($this->text, ENT_COMPAT, 'UTF-8')), $vars));
 }
Пример #8
0
 function __construct($args)
 {
     parent::__construct($args);
 }
Пример #9
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('content', null, $args);
 }