Example #1
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('taskYes', null, $args);
     $this->arg('taskNo', null, $args, $this->taskYes);
     $this->arg('strUndefined', null, $args, '');
     $this->arg('strNO', null, $args, 'JNO');
     $this->arg('strYES', null, $args, 'JYES');
     // TODO : You can customize the behaviors icons and strings here
     $this->states = array(1 => array($this->taskYes, $this->strYES, $this->strYES, $this->strYES, $this->tooltip, 'publish', 'publish'), 0 => array($this->taskNo, $this->strNO, $this->strNO, $this->strNO, $this->tooltip, 'unpublish', 'unpublish'), '' => array($this->taskNo, $this->strUndefined, $this->strUndefined, $this->strUndefined, $this->tooltip, 'warning', 'warning'));
 }
Example #2
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('task', null, $args, 'default');
     $this->arg('strNO', null, $args);
     $this->arg('strYES', null, $args);
     if ((bool) $this->dataValue) {
         $this->enabled = false;
     }
     if (!$this->enabled) {
         $this->tooltip = false;
     }
     $this->taskYes = null;
     $lib = ' ' . $this->iconLibrary;
     $icons = array(0 => 'star-empty' . $lib, 1 => 'star' . $lib);
     if (!$this->jVersion('3.0')) {
         $icons = array(0 => 'notdefault' . $lib, 1 => 'default' . $lib);
     }
     if ($this->togglable) {
         if (empty($this->strYES)) {
             $this->strYES = '';
         }
         if (empty($this->strNO)) {
             $this->strNO = 'JDEFAULT';
         }
     }
     //Add the descriptions in the tooltip. Same description is used for each state
     if (!empty($this->strYES)) {
         $this->strYES = JText::_($this->strYES) . '::' . $this->description;
     }
     if (!empty($this->strNO)) {
         $this->strNO = JText::_($this->strNO) . '::' . $this->description;
     }
     // TODO : You can eventually customize your behaviors icons and strings here
     $this->states = array(1 => array(null, $this->strYES, $this->strYES, $this->strYES, $this->tooltip, $icons[1], $icons[1]), 0 => array($this->task, $this->strNO, $this->strNO, $this->strNO, $this->tooltip, $icons[0], $icons[0]), '' => array($this->task, $this->strNO, $this->strNO, $this->strNO, $this->tooltip, $icons[0], $icons[0]));
 }
Example #3
0
 function __construct($args)
 {
     parent::__construct($args);
     $this->arg('publishUp', null, $args, true);
     $this->arg('publishDown', null, $args, true);
 }