Navigation Menu

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

repaire help on View class document #7953

Merged
merged 1 commit into from Jan 7, 2016
Merged

repaire help on View class document #7953

merged 1 commit into from Jan 7, 2016

Conversation

saeideng
Copy link
Member

@saeideng saeideng commented Jan 3, 2016

No description provided.

@dereuromark
Copy link
Member

Wouldn't $this->viewBuilder()->theme('SuperHot'); suffice as one liner?
People could also place this somewhere else if they want to.

@dereuromark dereuromark added this to the 3.1.7 milestone Jan 3, 2016
@saeideng
Copy link
Member Author

saeideng commented Jan 3, 2016

oh , ok good idea

@ionas
Copy link
Contributor

ionas commented Jan 3, 2016

I do actually like the example. Gives you an idea where to place it.

@dereuromark
Copy link
Member

@ionas But that should be in the docs (where it can be easily found with all the scope relevant things like namespace and use statements), not the doc block!

@ionas
Copy link
Contributor

ionas commented Jan 3, 2016

Agreed!

@ionas
Copy link
Contributor

ionas commented Jan 3, 2016

And it is. http://book.cakephp.org/3.0/en/views/themes.html#themes
Is there an option to add this to the class docblock as a link?

* `public function beforeRender(\Cake\Event\Event $event)
* {
* $this->viewBuilder()->theme('SuperHot');
* }`
Copy link
Member

Choose a reason for hiding this comment

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

Examples should start with 3 backticks.

@markstory
Copy link
Member

Short examples in the API are 👍. We have lots of examples already and more make the API a more useful resource in my opinion.

@dereuromark
Copy link
Member

@markstory I think documentation can put those examples in better perspective. The API doc block can only do that much without getting out of hand. In this example one could easily add the theme() call inside beforeRender() as well as any other callback prior to that one - or even the action itself.
Thus IMO the doc block should be kept simple and "always true". But I don’t mind either way.

markstory added a commit that referenced this pull request Jan 7, 2016
repaire help on View class document
@markstory markstory merged commit 2367b83 into cakephp:master Jan 7, 2016
markstory added a commit that referenced this pull request Jan 7, 2016
@saeideng saeideng deleted the patch-1 branch January 23, 2016 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants