Exemplo n.º 1
0
 /**
  *### .renderKeys()
  *
  * Renders the key values of the data in a hidden tag.
  */
 public function renderKeys()
 {
     $data = $this->dataProvider->getData();
     if (empty($data)) {
         return false;
     }
     if (!$this->sortableRows || !$this->getAttribute($data[0], (string) $this->sortableAttribute)) {
         parent::renderKeys();
     }
     echo CHtml::openTag('div', array('class' => 'keys', 'style' => 'display:none', 'title' => Yii::app()->getRequest()->getUrl()));
     foreach ($data as $d) {
         echo CHtml::tag('span', array('data-order' => $this->getAttribute($d, $this->sortableAttribute)), CHtml::encode($this->getPrimaryKey($d)));
     }
     echo "</div>\n";
     return true;
 }