コード例 #1
0
 public function getFormElement()
 {
     $this->can_be_empty = true;
     $collection = $this->getPagesCollection();
     $this->params['values'] = array();
     foreach ($collection as $el) {
         $this->params['values'][] = array('value' => $el->getIdentifier(), 'name' => $el->getTitle());
     }
     return parent::getFormElement();
 }
 public function getFormElement()
 {
     $collection = $this->getPagesCollection();
     $this->params['values'] = array(array('value' => '__empty__', 'name' => 'Disable')) + $this->params['values'];
     if ($collection) {
         foreach ($collection as $el) {
             $this->params['values'][] = array('value' => $el->getIdentifier(), 'name' => $el->getTitle());
         }
     }
     return parent::getFormElement();
 }