orchestral/control

description added to roles

wisepotato opened this issue · 6 comments

I like descriptions, just like with forms I want everything to atleast be capable of carrying a description. So I'd suggest a description to be added (or be atleast optional) for roles. This serves great purpose for larger websites with a lot of roles to keep track of all the different roles.

If you agree I can put together a Pull request

The only way to add this is by attaching multiple events to create, update and validating of roles, which is similar approach to user.

there is however NO way to add this to the table, the end result which I want.

as seen in \Processor\Role.php

    /**
     * View list roles page.
     *
     * @param  object  $listener
     * @return mixed
     */
    public function index($listener)
    {
        $eloquent = $this->model->paginate();
        $table    = $this->presenter->table($eloquent);

        return $listener->indexSucceed(compact('eloquent', 'table'));
    }

Where should I hook in?

you are right however with users

    /**
     * View list users page.
     *
     * @param  object  $listener
     * @param  string  $input
     * @return mixed
     */
    public function index($listener, array $input = array())
    {
       (...)

        Event::fire('orchestra.list: users', array($eloquent, $table));

       (...)
        return $listener->indexSucceed($data);
    }

There functionality is not there yet, but that the approach if you want to submit the PR.

Sure ill add it

could you try adding the event? My installation does not allow for this to happen. I can add the event list in any other method than index, but not index itself. Where I would like to have it.

It throws a 404

This should be available on @dev stability.