Пример #1
0
 /** {@inheritdoc} */
 public function __construct($renderer, $query = null, $pager = null)
 {
     // Fill default column fields for collection
     $this->fields = array(new Generic('distribution_id', t('#', true), 0, '', 0), new Template('template_id', t('Template', true), 0), new Generic('recipient_count', t('Recipients count', true), 0, '', 0), new Generic('open_count', t('Opens count', true), 0, '', 0), new Generic('click_count', t('Clicks count', true), 0, '', 0), new Status('status', t('Status', true), 0), new Generic('ts', t('Created', true), 10, '', 0), new Generic('finished', t('Finished', true), 10, '', 0), new Control());
     // Call parents
     parent::__construct($renderer, $query, $pager);
     $this->fill();
 }
Пример #2
0
 /**
  * Overload default constructor
  * @param RenderInterface $renderer View renderer
  * @param QueryInterface $query Database query
  * @param PagerInterface $pager Paging
  */
 public function __construct(RenderInterface $renderer, QueryInterface $query, PagerInterface $pager)
 {
     // Fill collection fields
     $this->fields = array(new Generic('GroupID', '#', 0, 'id', false), new Generic('Name', t('Название группы', true), 0, 'group_name', true), new Generic('Active', t('Активный', true), 11, 'publish'), new Control());
     // Call parent
     parent::__construct($renderer, $query, $pager);
     // Fill collection on creation
     $this->fill();
 }
Пример #3
0
 /**
  * Overload default constructor
  * @param RenderInterface $renderer View renderer
  * @param QueryInterface $query Database query
  * @param PagerInterface $pager Paging
  */
 public function __construct(RenderInterface $renderer, QueryInterface $query, PagerInterface $pager)
 {
     // Fill collection fields
     $this->fields = array(new Generic('user_id', '#', 0, 'id', false), new FullName(), new Generic('modified', t('Последнее изменение', true), 3), new TableGroup('group_id', t('Группа', true)), new Control());
     // Call parent
     parent::__construct($renderer, $query, $pager);
     // Apply sorting by identifier
     $this->sorter($this->entityPrimaryField, 'DESC');
     // Fill collection on creation
     $this->fill();
 }