API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Access%21...
> Most checkers should prefer DENY
This should be fully quantified so it forms a link on api.d.org
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | class_name_added_to_constant_link_to_api.d.org-2218293-15.patch | 531 bytes | Anonymous (not verified) |
| #9 | class_name_added_to_constant_link_to_api.d.org-2218293-9.patch | 577 bytes | Anonymous (not verified) |
| #7 | class_name_added_to_constant_link_to_api.d.org-2218293-7.patch | 556 bytes | kokobutter |
| #4 | class_name_added_to_constant_link_to_api.d.org-2218293-4.patch | 531 bytes | Anonymous (not verified) |
Comments
Comment #1
jhodgdonYes, and while we're in there, maybe we could take out the line that says that AccessInterface::KILL overrides itself? :)
I am not sure "quantify" is clear to Novice contributors (I scratched my head a bit?) -- what is needed is for the constant to have the class name on it: AccessInterface::DENY presumably.
Comment #2
joachim commentedSorry, I thought 'quantify' was the PHP term for giving the name space. Maybe I was thinking of 'qualify'?
Comment #3
jhodgdonYou may be right, I'm not sure. Probably "qualify" though, as in "fully-qualified namespace"? Anyway, we don't actually need the namespace, just the class name (as you can see on the existing page, AccessInterface::KILL turned into a link without the namespace).
Comment #4
Anonymous (not verified) commentedI attached a patch, thanks for the oppurtunity!
Comment #5
Anonymous (not verified) commentedI added the classname AccessInterface to the constant DENY.
Comment #6
kokobutter commentedi confuse at want is asking for. is it asking for a class name and that all
Comment #7
kokobutter commentedI change the wording a little to be easier to understand.
Comment #8
joachim commentedThanks both of you!
The wording of the second patch is a little clearer, but the way the class name is used is correct in the first patch. It should be 'AccessInterface::DENY', because the api module on api.drupal.org will parse that string and turn it into a link to that constant.
Comment #9
Anonymous (not verified) commentedI added the Class name and made the definition clearer
Comment #10
dawehnerwhat about using static::DENY?
Comment #11
Anonymous (not verified) commentedComment #12
joachim commentedThere's no need to explain where it's a defined as a constant. Writing it with the interface name will make the API module output it as a link, so the context is clear.
> what about using static::DENY?
That won't link then will it?
Comment #13
dawehnerWell, api.drupal.org should support it. It is kinda helpful to make it clear on the semantic level that it is this level.
Comment #14
jhodgdonstatic::DENY will link properly inside code, but not (at this time) inside documentation blocks. It would be kind of a pain to make it work in doc blocks -- not horrible, but kind of a pain -- so for now I'd prefer to just put the AccessInterface::DENY in there. We have used this way of referring to class methods/constants all over other doc blocks.
So can we just go back to the patch in #4? Except, the wording of this sentence is very awkward for a native English speaker... Could we rewrite the sentence to say "In most cases, using AccessInterface::DENY is preferable." please?
Comment #15
Anonymous (not verified) commentedI updated the docs to remove unecessary text.
Comment #16
jhodgdonOK, good enough, thanks!
Note: We are in a pre-alpha-release period through Wed the 19th, where only critical and major issues can be committed (this one is "minor", so it will have to wait).
Comment #17
jhodgdonThanks again! Committed to 8.x.