Esempio n. 1
0
 public function render($params = array())
 {
     $jplugins = $this->_config->get('jplugins');
     $display = isset($params['display']) ? $params['display'] : 'all';
     $result = array();
     switch ($display) {
         case 'all':
             foreach ($this as $self) {
                 if (($text = $this->_data->get('value', '')) && !empty($text)) {
                     $result[] = $text;
                 }
             }
             break;
         case 'first':
             $this->rewind();
             if (($text = $this->_data->get('value', '')) && !empty($text)) {
                 $result[] = $text;
             }
             break;
         case 'all_without_first':
             $this->rewind();
             while ($this->next()) {
                 if (($text = $this->_data->get('value', '')) && !empty($text)) {
                     $result[] = $text;
                 }
             }
             break;
     }
     // trigger joomla content plugins
     if ($jplugins) {
         for ($i = 0; $i < count($result); $i++) {
             $result[$i] = ZooHelper::triggerContentPlugins($result[$i]);
         }
     }
     return ElementHelper::applySeparators($params['separated_by'], $result);
 }
Esempio n. 2
0
 public function getText($text)
 {
     return ZooHelper::triggerContentPlugins($text);
 }