Skip to content

\CrudView\Listener\ViewListener::_associations receives $whitelist as [0, 1, 2, 3, 4] #332

@mehov

Description

@mehov

Hi,

I'm trying to have CrudView use displayField values when linking to associated entries. Right now it links to them via their IDs.

It isn't really documented, I guess because it should just work by default. For me it doesn't, and the only resource I found is #280, which at least gave me an idea of where to poke around.

$keys = $associations->keys();

Doing debug([$keys, $whitelist]); right after that says I have an array of normal model names as $keys (Pages, Posts) and an array of integers as $whitelist (0, 1). The latter has exactly as many elements as the former and starts from 0, which makes it seem someone just used array keys instead of values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions