Frontend\Modules\ContentBlocks\Engine\Model::get PHP Метод

get() публичный статический Метод

Get an item.
Устаревший: use doctrine instead
public static get ( string $id ) : array
$id string The id of the item to fetch.
Результат array
    public static function get($id)
    {
        trigger_error('Frontend\\Modules\\ContentBlocks\\Engine is deprecated.
             Switch to doctrine instead.', E_USER_DEPRECATED);
        return (array) FrontendModel::getContainer()->get('database')->getRecord('SELECT i.title, i.text, i.template
             FROM content_blocks AS i
             WHERE i.id = ? AND i.status = ? AND i.hidden = ? AND i.language = ?', array((int) $id, 'active', 'N', LANGUAGE));
    }

Usage Example

Пример #1
0
 /**
  * Load the data
  */
 private function loadData()
 {
     $this->item = FrontendContentBlocksModel::get((int) $this->data['id']);
 }
Model