public function setModel($model)
    {
        // in case of Agile Data model - don't add it to object.
        // Agile Data Model owner is Agile Data Persistance and so be it.
        if ($model instanceof \atk4\data\Model) {
            return $this->model = $model;
        }

        $model = $this->app->normalizeClassName($model, 'Model');
        $this->model = $this->add($model);

        return $this->model;
    }
public function setModel($model)
    {
        // in case of Agile Data model - don't add it to object.
        // Agile Data Model owner is Agile Data Persistance and so be it.
        if ($model instanceof \atk4\data\Model) {
            return $this->model = $model;
        }

        $model = $this->app->normalizeClassName($model, 'Model');
        $this->model = $this->add($model);

        return $this->model;
    }
public function setModel ( $ model ) { // in case of Agile Data model - don't add it to object. // Agile Data Model owner is Agile Data Persistance and so be it. if ( $ model instanceof \ atk4 \ data \ Model ) { return $ this -> model = $ model ; } $ model = $ this -> app -> normalizeClassName ( $ model , 'Model' ) ; $ this -> model = $ this -> add ( $ model ) ; return $ this -> model ; }
Associate model with object.

@param string|object $model Class or instance of model

@return AbstractModel Newly added Model
Associate model with object .