array( 'data_type' => 'integer', 'primary' => true, 'autocomplete' => true, ), 'CODE' => array( 'data_type' => 'string', 'required' => true, ), 'ACTIVE' => array( 'data_type' => 'boolean', 'values' => array(self::INACTIVE, self::ACTIVE) ), 'SORT' => array( 'data_type' => 'integer', ), 'NAME' => array( 'data_type' => 'string', ), 'CLIENT_ID' => array( 'data_type' => 'string', ), 'CLIENT_SECRET' => array( 'data_type' => 'string', ), 'REDIRECT_URI' => array( 'data_type' => 'string', ), 'SETTINGS' => array( 'data_type' => 'text', ), ); return $fieldsMap; } public static function getByCode($code) { return SearchEngineTable::getList([ 'filter' => ['=CODE' => $code], ]); } }