_init(Document::class, LogEntryResource::class); $this->setMainTable(LogEntryResource::TABLE_NAME); $this->addFilterToMap('full_name', new \Zend_Db_Expr(self::FULL_NAME_EXPR)); $this->addFilterToMap('username', 'main_table.username'); } protected function _initSelect() { parent::_initSelect(); $this->getSelect()->joinLeft( [self::ADMIN_TABLE_ALIAS => $this->getTable('admin_user')], 'main_table.username = ' . self::ADMIN_TABLE_ALIAS . '.username', [ 'full_name' => new \Zend_Db_Expr(self::FULL_NAME_EXPR), 'email' => self::ADMIN_TABLE_ALIAS . '.email', ] ); return $this; } }