PHP 인터페이스 luya\base\AdminModuleInterface

All administration modules must implement the AdminModuleInterface, this allows LUYA to deliver modules on the area the are used. Some modules are only used in frontend others are just in administration context those modules must implement AdminModuleInterface.
부터: 1.0.0-RC1
저자: Basil Suter ([email protected])
파일 보기 프로젝트 열기: luyadev/luya

공개 메소드들

메소드 설명
getAdminAssets ( ) : array Returns all Asset files to registered in the administration interfaces.
getJsTranslationMessages ( ) : array Returns all message identifier for the current module which should be assigned to the javascript admin interface.
getMenu ( ) : array | luya\admin\components\AdminMenuBuilderInterface The menu object from the {{\luya\admin\components\AdminMenuBuilder}} class in order to store and build the administration module menu elements.

메소드 상세

getAdminAssets() 공개 메소드

As the adminstration UI is written in angular, the assets must be pre assigned to the adminisration there for the getAdminAssets() method exists. php public function getAdminAssets() { return [ 'luya\admin\assets\Main', 'luya\admin\assets\Flow', ]; }
public getAdminAssets ( ) : array
리턴 array An array with with assets files where the array has no key and the value is the path to the asset class.

getJsTranslationMessages() 공개 메소드

As the administration UI is written in angular, translations must also be available in different javascript section of the page. The response array of this method returns all messages keys which will be assigned: Example: php public function getJsTranslationMessages() { return ['js_ngrest_rm_page', 'js_ngrest_rm_confirm', 'js_ngrest_error'], } Assuming the aboved keys are also part of the translation messages files. In the javascript code you can access assigned js translation message like followed: js i18n['js_ngrest_rm_page'];
public getJsTranslationMessages ( ) : array
리턴 array An array with values of the message keys based on the Yii translation system.

getMenu() 공개 메소드

The menu object from the {{\luya\admin\components\AdminMenuBuilder}} class in order to store and build the administration module menu elements.
public getMenu ( ) : array | luya\admin\components\AdminMenuBuilderInterface
리턴 array | luya\admin\components\AdminMenuBuilderInterface