Advertisement
fernandezekiel

Untitled

Jan 29th, 2013
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. class Customers extends DPortlet {
  4.  
  5.     protected function renderContent(){
  6.         //echo 'Blogs Content';
  7.        
  8.         $model = new Customer('search');
  9.        
  10.         if(isset($_GET['Customer']))
  11.             $model->attributes = @$_GET['Customer'];
  12.        
  13.         $this->widget('RestrictedGridView', array(
  14.             'dataProvider' => $model->search(),
  15.             'filter' => $model,
  16.             'columns' => array(
  17.                 /* 'id', */
  18.                 array(
  19.                     'name' => 'name',
  20.                     'type' => 'raw',
  21.                     'value' => 'CHtml::link($data->name, Yii::app()->createUrl("crm/customer/view",array("id"=>$data->id)))',
  22.                 ),
  23.                 /*array(
  24.                     'class' => 'bootstrap.widgets.TbButtonColumn',
  25.                 ),*/
  26.                 )));
  27.     }
  28.  
  29.     protected function getTitle() {
  30.         return 'Customers';
  31.     }
  32.  
  33.     protected function getClassName() {
  34.         return __CLASS__;
  35.     }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement