Example #1
0
 /**
  * Adds the following columns:
  *
  * - `term`: An instance of {@link ManageBlock\TermColumn}.
  * - `vid`: An instance of {@link ManageBlock\VidColumn}.
  * - `popularity`: An instance of {@link ManageBlock\PopularityColumn}.
  */
 protected function get_available_columns()
 {
     return array_merge(parent::get_available_columns(), array('term' => __CLASS__ . '\\TermColumn', 'vid' => __CLASS__ . '\\VidColumn', 'popularity' => __CLASS__ . '\\PopularityColumn'));
 }
Example #2
0
 public function __construct(Module $module, array $attributes = array())
 {
     parent::__construct($module, $attributes + array(self::T_ORDER_BY => array('timestamp', 'desc')));
 }
Example #3
0
 /**
  * Alters the query with the 'is_online' and 'uid' filters. Also adds a condition on the
  * siteid, which must be the same as the current site or zero.
  */
 protected function alter_query(Query $query, array $filters)
 {
     return parent::alter_query($query, $filters)->filter_by_constructor($this->module->id)->similar_site;
 }
Example #4
0
 protected function alter_query(Query $query, array $filters)
 {
     global $core;
     return parent::alter_query($query, $filters)->where('(SELECT 1 FROM {prefix}nodes WHERE nid = comment.nid AND (siteid = 0 OR siteid = ?)) IS NOT NULL', $core->site_id);
 }
Example #5
0
 /**
  * Adds the following columns:
  *
  * - `title`: An instance of {@link ManageBlock\TitleColumn}.
  * - `url`: An instance of {@link ManageBlock\URLColumn}.
  * - `language`: An instance of {@link ManageBlock\LanguageColumn}.
  * - `status`: An instance of {@link ManageBlock\StatusColumn}.
  * - `timezone`: An instance of {@link ManageBlock\TimezoneColumn}.
  * - `update_at`: An instance of {@link \Icybee\ManageBlock\DateTimeColumn}.
  */
 protected function get_available_columns()
 {
     return array_merge(parent::get_available_columns(), array('title' => __CLASS__ . '\\TitleColumn', 'url' => __CLASS__ . '\\URLColumn', 'language' => __CLASS__ . '\\LanguageColumn', 'status' => __CLASS__ . '\\StatusColumn', 'timezone' => __CLASS__ . '\\TimezoneColumn', 'updated_at' => 'Icybee\\ManageBlock\\DateTimeColumn'));
 }
Example #6
0
 /**
  * Adds the following jobs:
  *
  * - `activate`: Activate the selected records.
  * - `deactivate`: Deactivate the selected records.
  */
 protected function get_available_jobs()
 {
     return array_merge(parent::get_available_jobs(), [Module::OPERATION_ACTIVATE => I18n\t('activate.operation.title'), Module::OPERATION_DEACTIVATE => I18n\t('deactivate.operation.title')]);
 }