CakeDC / Enum

Enumeration list for CakePHP
MIT License
27 stars 17 forks source link

Missing Helper? #28

Closed cewi closed 7 years ago

cewi commented 7 years ago

/Docs/Documentation/Configuration.md states to load a helper:

$this->loadHelper('CakeDC/Enum.Enum');

My downloaded plugin doesn't include a helper. Version v.1.0.0, installation via composer.

pmoraes commented 7 years ago

Hi @cewi, I was taking a look at this issue, the documentation is wrong, just need to fix the documentation, please do not use "$this->loadHelper('CakeDC/Enum.Enum');" it isn't being used anymore.

cewi commented 7 years ago

Thank you. I instead load the list with the enum() method in the controller and set the variable for the template, e.g.:

     $this->set('types', $this->Articles->enum('type'));

Is this the recommended way?

pmoraes commented 7 years ago

Hi @cewi, yes. This is the recommended way. I'll fix the documentation, so we won't more problems like that.

Do you need something more?

cewi commented 7 years ago

No, that's perfect for me. Thanks!