addBehaviors([ 'adminBlogPreferencesFormV2' => [BackendBehaviors::class, 'adminBlogPreferencesFormV2'], 'adminBeforeBlogSettingsUpdate' => [BackendBehaviors::class, 'adminBeforeBlogSettingsUpdate'], 'adminFiltersListsV2' => [BackendBehaviors::class, 'adminFiltersListsV2'], 'adminColumnsListsV2' => [BackendBehaviors::class, 'adminColumnsListsV2'], 'adminPostListHeaderV2' => [BackendBehaviors::class, 'adminPostListHeaderV2'], 'adminPostListValueV2' => [BackendBehaviors::class, 'adminPostListValueV2'], 'adminBeforePostDelete' => [BackendBehaviors::class, 'adminBeforePostDelete'], ]); if (My::settings()->get('periodical_active')) { // add backend sidebar icon My::addBackendMenuItem(); // register bakend behaviors required user permissions dcCore::app()->addBehaviors([ 'adminDashboardFavoritesV2' => [BackendBehaviors::class, 'adminDashboardFavoritesV2'], 'adminPostHeaders' => [BackendBehaviors::class, 'adminPostHeaders'], 'adminPostsActions' => [BackendBehaviors::class, 'adminPostsActions'], 'adminPostFormItems' => [BackendBehaviors::class, 'adminPostFormItems'], 'adminAfterPostUpdate' => [BackendBehaviors::class, 'adminAfterPostSave'], 'adminAfterPostCreate' => [BackendBehaviors::class, 'adminAfterPostSave'], ]); } return true; } }