Beispiel #1
0
 /**
  * Sets the 
  * 
  * @return string
  */
 public function display()
 {
     //Get the view name
     $name = $this->getName();
     //set the state data to the view
     $this->_data = array_merge($this->_state->toArray(), $this->_data);
     //Assign the data of the model to the view
     if ($items = $this->_state->getList()) {
         $this->_data[KInflector::pluralize($name)] = $items;
         $this->_data['items'] = $items;
     }
     if ($item = $this->_state->getItem()) {
         $this->_data[KInflector::singularize($name)] = $item;
         $this->_data['item'] = $item;
     }
     return parent::display();
 }