Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Find CompositeField actions #21

Merged
merged 1 commit into from
Sep 5, 2022
Merged

FIX: Find CompositeField actions #21

merged 1 commit into from
Sep 5, 2022

Conversation

a2nt
Copy link
Contributor

@a2nt a2nt commented Sep 5, 2022

Without recursive search for Actions this code block won't work:

 public function getCMSActions()
 {
        $actions = parent::getCMSActions();

        $actions->addFieldsToTab('ActionMenus.MoreOptions', [
            CustomAction::create('doCreateDefaultElements', 'Create Default Blocks'),
        ]);

        return $actions;
}

So you won't be able to add an action to submenu
Screenshot from 2022-09-05 10-24-06

Without recursive search for Actions this code block won't work:
``
 public function getCMSActions()
 {
        $actions = parent::getCMSActions();

        $actions->addFieldsToTab('ActionMenus.MoreOptions', [
            CustomAction::create('doCreateDefaultElements', 'Create Default Blocks'),
        ]);

        return $actions;
}
``
@lekoala lekoala merged commit 148dd3c into lekoala:master Sep 5, 2022
@lekoala
Copy link
Owner

lekoala commented Sep 5, 2022

@a2nt good stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants