/** */ public function __construct() { parent::__construct(); $this->model = new Image; $this->cols = array( 'Id' => NULL, 'ThumbnailFileName' => getGS('Thumbnail'), 'Description' => getGS('Description'), 'Photographer' => getGS('Photographer'), 'Place' => getGS('Place'), 'Date' => getGS('Date'), 'TimeCreated' => getGS('Added'), 'LastModified' => getGS('Last modified'), 'InUse' => getGS('In use'), ); $this->searchCols = array( 'Description', 'Photographer', 'Place', ); $this->ignoredCols = array('InUse'); $this->inUseColumn = sizeof($this->cols) - 1; // set sorting $this->defaultSorting = 6; $this->defaultSortingDir = 'desc'; $this->notSortable[] = 1; }
/** * Process db row * @param array $row * @return array */ public function processRow(array $row) { global $ADMIN; // edit link $row['file_name'] = sprintf('<a href="/%s/media-archive/edit-attachment.php?f_attachment_id=%d">%s</a>', $ADMIN, $row['id'], $row['file_name']); // human readable size $row['size_in_bytes'] = parent::FormatFileSize($row['size_in_bytes']); // yes/no disposition $row['content_disposition'] = empty($row['content_disposition']) ? getGS('Yes') : getGS('No'); // get in use info $object = new Attachment($row['id']); $row['InUse'] = (int) $object->inUse(); return array_values($row); }
/** * @param bool $randomId */ public function __construct($randomId = FALSE) { parent::__construct(); // generate id - unique per page instance if (empty(self::$lastId)) { self::$lastId = __FILE__; if ($randomId) { self::$lastId = uniqid(); } } $this->id = substr(sha1(self::$lastId), -6); self::$lastId = $this->id; // column titles $this->cols = array('Number' => NULL, 'Language' => getGS('Language'), 'Order' => getGS('Order')); }
/** * @param bool $randomId */ public function __construct($randomId = FALSE) { parent::__construct(); // generate id - unique per page instance if (empty(self::$lastId)) { self::$lastId = __FILE__; if ($randomId) { self::$lastId = uniqid(); } } $this->id = substr(sha1(self::$lastId), -6); self::$lastId = $this->id; // column titles $this->cols = array('Number' => NULL, 'Language' => getGS('Language'), 'Order' => getGS('Order'), 'Name' => getGS('Title'), 'Section' => getGS('Section'), 'Webcode' => getGS('Webcode'), 'Type' => getGS('Type'), 'Created' => getGS('Created by'), 'Author' => getGS('Author'), 'Status' => getGS('Status'), 'OnFrontPage' => getGS('On Front Page'), 'OnSectionPage' => getGS('On Section Page'), 'Images' => getGS('Images'), 'Topics' => getGS('Topics'), 'Comments' => getGS('Comments'), 'Reads' => getGS('Reads'), 'UseMap' => getGS('Use Map'), 'Locations' => getGS('Locations'), 'CreateDate' => getGS('Create Date'), 'PublishDate' => getGS('Publish Date'), 'LastModified' => getGS('Last Modified'), 'Preview' => getGS('Preview'), 'Translate' => getGS('Translate')); }
/** * @param bool $randomId */ public function __construct($randomId = FALSE) { parent::__construct(); $translator = \Zend_Registry::get('container')->getService('translator'); // generate id - unique per page instance if (empty(self::$lastId)) { self::$lastId = __FILE__; if ($randomId) { self::$lastId = uniqid(); } } $this->id = substr(sha1(self::$lastId), -6); self::$lastId = $this->id; // column titles $this->cols = array('Number' => NULL, 'Language' => $translator->trans('Language'), 'Order' => $translator->trans('Order')); }
/** * @param bool $randomId */ public function __construct($randomId = false) { parent::__construct(); $translator = \Zend_Registry::get('container')->getService('translator'); // generate id - unique per page instance if (empty(self::$lastId)) { self::$lastId = __FILE__; if ($randomId) { self::$lastId = uniqid(); } } $this->id = substr(sha1(self::$lastId), -6); self::$lastId = $this->id; // column titles $this->cols = array('Number' => null, 'Language' => $translator->trans('Language'), 'Order' => $translator->trans('Order'), 'Name' => $translator->trans('Title', array(), 'api'), 'Section' => $translator->trans('Section'), 'Webcode' => $translator->trans('Webcode', array(), 'library'), 'Type' => $translator->trans('Type'), 'Created' => $translator->trans('Created by'), 'Author' => $translator->trans('Author'), 'Status' => $translator->trans('Status'), 'OnFrontPage' => $translator->trans('On Front Page'), 'OnSectionPage' => $translator->trans('On Section Page'), 'Images' => $translator->trans('Images'), 'Topics' => $translator->trans('Topics'), 'Comments' => $translator->trans('Comments'), 'Reads' => $translator->trans('Reads'), 'UseMap' => $translator->trans('Use Map', array(), 'library'), 'Locations' => $translator->trans('Locations', array(), 'library'), 'CreateDate' => $translator->trans('Create Date', array(), 'library'), 'PublishDate' => $translator->trans('Publish Date', array(), 'library'), 'LastModified' => $translator->trans('Last Modified', array(), 'articles'), 'Preview' => $translator->trans('Preview'), 'Translate' => $translator->trans('Translate')); }
/** * Render table. * @return ArticleList */ public function render() { $this->beforeRender(); include $this->getPath('table.php'); self::$renderTable = TRUE; echo '</div><!-- /#list-' . $this->id . ' -->'; return $this; }
/** * @see BaseList */ public function doData() { $args = $this->getArgs(); if (!empty($args['filter']) && $args['filter'] == 'sda') { $this->filters = array('1'); } return parent::doData(); }
/** * ListObject クラスの新しいインスタンスを初期化します。 * * @param array $input 初期化時に保持する要素のリスト */ public function __construct(array $input = []) { parent::__construct($input); }