Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

No need of init call, its taken care in add addButton will addButton will #730

Closed
wants to merge 135 commits into from

Conversation

gowrav-vishwakarma
Copy link
Contributor

No description provided.

DarkSide666 and others added 30 commits April 14, 2016 00:12
Fix validateNotNull and validateField
call to hook ‘createForm’ will return an array, with the form at index
0, instead of the form object. Therefore to properly assign $this-form
to the form, we need to use index 0 of the return array.
add index 0 since hook method return array
Use clone instead of newInstance() because it clones controller, _table, elements etc. which we need if Auth is used simply like this:
```
$this->add('Auth')->allow('admin', 'secret')->check();
```
Application Error: Warning: [D:\OpenServer\domains\smbo2.loc\vendor\atk4\atk4\lib\DB/<b>dsql.php</b>:1209]implode(): Invalid arguments passed
fix implode error for php 7.0
In 4.2 this was implemented long time ago: 11e5779
I'm not sure why I have forgot 4.3 branch. Anyway here it is and works like a charm :)
This is especially important, if you addButton() to field.
addButton will reside in after_field template tag and if you have field hint, then it'll mess design when attached to the same template tag where button (after_field).
This is especially important, if you addButton() to field.
addButton will reside in after_field template tag and if you also have field hint, then it'll mess design when attached to the same template tag where button (after_field).
Feature: allow DSQL->table() to set table as sub-select (dsql object)
Previously this could be misused like this:

```
$this->add('Auth', ['login_field' => 'login', 'password' => 'mypass']);
$this->auth->setModel('User');
```

This way it still would use default values 'email' and 'password', because they was set as default 2nd and 3rd param values of Auth_Basic::setModel() method.
Form field hint should go below field not after
romaninsh and others added 27 commits October 5, 2016 23:59
… use null instead. This should be backwards compatible.
…ike sub-grids/cruds) when primary view (like form) is associated with model.

usage exmple:
```
class View_Person_View extends View
{
    public function init()
    {
        parent::init();

        // main form
        $v = $this->add('Form');
        $this->addHook('set-model', function($self, $m, $f) use ($v) {
            $v->setModel($m, $f);
        });

        // sub-grid
        $g = $this->add('Grid');
        $this->addHook('set-model', function($self, $m, $f) use ($g) {
            $g->setModel($m->ref('BankAccounts'));
        });
    }
}

// with one setModel you can initialize everything
$this->add('View_Person_View')->setModel($m->load(1));
```
See usage example in class definition file.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants