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

[AdminListBundle] Make it possible to have no item actions for some records #169

Merged
merged 1 commit into from
Feb 26, 2015

Conversation

jockri
Copy link
Contributor

@jockri jockri commented Feb 24, 2015

When some rows in the adminlist do not need to have a certain item action, you can just do this:

        $create_route = function ($item) {
            if (!$item->foo()) {
                return null;
            } else {
                return array(
                    'path'   => 'mybundle_admin_projects',
                    'params' => array('id' => $item->getSlug())
                );
            }
        };
        $ia = new \Kunstmaan\AdminListBundle\AdminList\ItemAction\SimpleItemAction($create_route, "eye-open", "Preview");
        $this->addItemAction($ia);

krispypen added a commit that referenced this pull request Feb 26, 2015
make it possible to have no item actions for some records
@krispypen krispypen merged commit 793f47c into Kunstmaan:master Feb 26, 2015
@jockri jockri deleted the fix_adminlist_item_actions branch February 26, 2015 08:28
@roderik roderik modified the milestones: Q2 2015 - v3.2, Q1 2015 - v3.1 Feb 28, 2015
IbeVanmeenen pushed a commit to IbeVanmeenen/KunstmaanBundlesCMS that referenced this pull request Mar 6, 2015
@roderik roderik changed the title make it possible to have no item actions for some records [AdminListBundle] Make it possible to have no item actions for some records Apr 8, 2015
@roderik roderik modified the milestones: 3.1.0, 3.0.2 Apr 10, 2015
wimvds added a commit to wimvds/KunstmaanBundlesCMS that referenced this pull request Oct 8, 2015
wimvds added a commit to wimvds/KunstmaanBundlesCMS that referenced this pull request Oct 8, 2015
strictly compare boolean
roderik pushed a commit that referenced this pull request Oct 8, 2015
[AdminBundle] fix admin 404 (#169)
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