Create, edit, delete Page, Media, User with an interface built on top of Sonata Admin.


composer require pushword/admin

That's it ! If you have a custom installation (not used the default installer),you may have a look inside vendor/pushword/admin/install.php.

Admin is now accessible via https://mydomain.tld/admin/.

Don't forget to create an user with ROLE_SUPER_ADMIN to access to the just installed admin :

php bin/console pushword:user:create

You may be intersted by the block editor.

Customize the admin

Admin is built on top of Sonata Admin with one more feature : the ability to manage displayed form fields from the configuration (not yet for list fields and search fields).

So, in your configuration, your default configuration is :

        - admin_page_form_fields
        - admin_user_form_fields
            - Pushword\Admin\FormField\PageH1Field
            - Pushword\Admin\FormField\PageMainContentField
                - Pushword\Admin\FormField\PagePublishedAtField
                - Pushword\Admin\FormField\PageMetaRobotsField
                - Pushword\Admin\FormField\HostField
                - Pushword\Admin\FormField\PageSlugField
                - Pushword\Admin\FormField\PageMainImageField
                - Pushword\Admin\FormField\PageParentPageField
                expand:              1
                    - Pushword\Admin\FormField\PageTitleField
                    - Pushword\Admin\FormField\PageNameField
                    - Pushword\Admin\FormField\PageSearchExcreptField
                    - Pushword\Admin\FormField\PriorityField
                - Pushword\Admin\FormField\PageLocaleField
                - Pushword\Admin\FormField\PageTranslationsField
                expand:              1
                    - Pushword\Admin\FormField\CustomPropertiesField
                expand:              1
                    - Pushword\Admin\FormField\OgTitleField
                    - Pushword\Admin\FormField\OgDescriptionField
                    - Pushword\Admin\FormField\OgImageField
                    - Pushword\Admin\FormField\OgTwitterCardField
                    - Pushword\Admin\FormField\OgTwitterSiteField
                    - Pushword\Admin\FormField\OgTwitterCreatorField
            - Pushword\Admin\FormField\UserEmailField
            - Pushword\Admin\FormField\UserUsernameField
            - Pushword\Admin\FormField\UserPasswordField
            - Pushword\Admin\FormField\CreatedAtField
                - Pushword\Admin\FormField\UserRolesField

You can directly edit this default list or customize them by editing this list on the fly with the pushword.admin.load_field event (see admin-block-editor extension for an example).

You can customize fields on app level, but when we create a new page, we don't know yet in wich app we are, we will use first app configuration (or global).