Skip to content

Huge improve in autocomplete / refactoring / usability for programmers - return specific type instead of generic one #907

@mvorisek

Description

@mvorisek

A lot of code constructs look like:

$form = $app->add('Form');

in better case there is an extra type hint like:

use atk4\ui\Form;

/* @var $form Form */
$form = $app->add('Form');

This is a feature request to add __construct option addTo (and maybe some generic option for things like addField) like:

use atk4\ui\Form;

$form = new Form(['addTo' => $app]);

which should be equivalent of $form = $app->add('Form');.

This will hugely improve utocomplete / refactoring / usability for programmers.

All usages and examples should be converted to the new syntax.

$app->add('Form') syntax should be dropped in the new 2.x branch and only $app->add($obj) should be supported. We should aim step by step for 100% refactorability.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions