Example #1
0
 public function __construct(\Icybee\ManageBlock $manager, $id, array $options = array())
 {
     parent::__construct($manager, $id, array('title' => 'Popularity', 'class' => 'pull-right', 'orderable' => true));
 }
Example #2
0
 public function __construct(\Icybee\Modules\Images\Albums\ManageBlock $manager, $id, array $options = array())
 {
     parent::__construct($manager, $id, $options + array('title' => 'Photos'));
 }
Example #3
0
 public function __construct(\Icybee\Modules\Users\ManageBlock $manager, $id, array $options = array())
 {
     parent::__construct($manager, $id, array('class' => 'pull-right cell-fitted', 'orderable' => true));
 }
Example #4
0
 public function __construct(\Icybee\ManageBlock $manager, $id, array $options = array())
 {
     parent::__construct($manager, $id, $options + array('discreet' => true));
 }
Example #5
0
 public function alter_records(array $records)
 {
     $records = parent::alter_records($records);
     $this->resolve_translations($records);
     return $records;
 }
Example #6
0
 public function __construct(\Icybee\ManageBlock $manager, $id, array $options = array())
 {
     parent::__construct($manager, $id, array('orderable' => false));
 }
Example #7
0
 /**
  * Includes the users associated with the records.
  */
 public function alter_records(array $records)
 {
     global $core;
     $records = parent::alter_records($records);
     $keys = [];
     foreach ($records as $record) {
         $keys[] = $record->{$this->id};
     }
     if ($keys) {
         $keys = array_unique($keys, SORT_NUMERIC);
         try {
             $this->user_cache = $core->models['users']->find($keys);
         } catch (RecordNotFound $e) {
             $this->user_cache = $e->records;
         }
     }
     return $records;
 }