It will be nice to have api.php file for D8.

Comments

eric.chenchao created an issue. See original summary.

eric.chenchao’s picture

Assigned: eric.chenchao » Unassigned
Status: Active » Needs review
StatusFileSize
new2.15 KB
gambry’s picture

Status: Needs review » Reviewed & tested by the community

Really minor tweaks. This can be changed on commit or even not changed at all, as issues seem to be consistent with original method definition docblock (see field_group_pre_render() on field_group.module).

So RTBCing. I suggest dockblock changes to be fixed if a followup, so we can fix the .api.php and .module files in one shot.
Thanks!

  1. +++ b/field_group.api.php
    @@ -0,0 +1,79 @@
    + * @param $rendering_object
    + *   The entity / form beïng rendered
    ...
    + * @param $rendering_object
    

    I understand this is confusing from the field_group_pre_render() definition, but I would at least add Object as previous parameter just to avoid CS errors.

  2. +++ b/field_group.api.php
    @@ -0,0 +1,79 @@
    + *   The entity / form beïng rendered
    ...
    +function hook_field_group_pre_render(&$element, &$group, &$rendering_object) {
    ...
    + *   The entity / form beïng rendered
    ...
    +function hook_field_group_pre_render_alter(&$element, &$group, &$rendering_object) {
    

    "The entity / form beïng rendered" to be "The entity / form being rendered.".

  3. +++ b/field_group.api.php
    @@ -0,0 +1,79 @@
    +function hook_field_group_pre_render(&$element, &$group, &$rendering_object) {
    ...
    +function hook_field_group_pre_render_alter(&$element, &$group, &$rendering_object) {
    

    array typehint on &element is missing. To be array &$element.

sime’s picture

Issue tags: +australia-nz-friday-triage
StatusFileSize
new2.33 KB

Applied suggestions in #3 with additional linting fixes for good measure.

nils.destoop’s picture

Seems good. I added an extra hook 'hook_field_group_form_process'

nils.destoop’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.