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

ENH Show a cannot create message when types is empty #174

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Jan 17, 2024

Issue #151

Test with

    public function getCMSFields()
    {
        // ...
        LinkField('MyLink')::create()->setAllowedTypes([MyLink::class]));
        // ...

Where MyLink has

    public function canCreate($member = null, $context = [])
    {
        return false;
    }

@sabina-talipova sabina-talipova self-assigned this Jan 17, 2024
Copy link
Contributor

@sabina-talipova sabina-talipova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested locally, works perfect. Looks good, just small question.

Copy link
Contributor

@sabina-talipova sabina-talipova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sabina-talipova sabina-talipova merged commit 4bc4883 into silverstripe:4 Jan 18, 2024
10 checks passed
@sabina-talipova sabina-talipova deleted the pulls/4/empty-list branch January 18, 2024 20:01
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.

3 participants