Get the model.

@return null|string
555949
public function getModel()
    {
        /* @var StreamInterface $stream */
        if ($stream = $this->streams->find($this->request->get('group'))) {
            return $stream->getEntryModelName();
        }

        return parent::getModel();
    }
1350919
public function getModel()
    {
        if ($this->_model === null) {
            $this->_model = Nav::findOne($this->navId);
            
            if (empty($this->_model)) {
                throw new Exception('The model active record could not be found for the corresponding nav item. Maybe you have inconsistent Database data.');
            }
        }
        
        return $this->_model;
    }
27141
public function getModelClass() {
		if ($this->model === null) {
			$introspection = $this->getIntrospectiveData();

			$modelBase = $introspection->name . self::MODEL_POSTFIX;
			$modelPath = $introspection->dirname . DIRECTORY_SEPARATOR .
						 $modelBase . '.' . $introspection->extension;

			$this->model = (is_file($modelPath))
				? $introspection->namespace . '\\' . $modelBase
				: self::MODEL_DEFAULT;
		}

		return $this->model;
	}
1331204
public function retrieveModel()
    {
        if ($this->model->persisted()) {
            return;
        }

        $modelClass = $this->modelClass;
        $this->model = $modelClass::find($this->modelId);

        if (!$this->model) {
            throw $this->modelNotFoundError();
        }
    }
427393
protected function getModel()
	{
		if (!$model = $this->owner) {
			throw new \Exception('Model is not been initialized properly.');
		}
		if (!$model instanceof ActiveRecord) {
			throw new \Exception(sprintf('Behavior must be applied to the ActiveRecord model class and it\'s iheritants, the unsupported class provided: `%s`', get_class($model)));
		}

		return $model;
	}
1273354
public function getManagedModel()
    {
        if (!isset($this->managedModel) || $this->managedModel === null) {
            throw new ModelAdminException('You have a ModelAdmin which does not have a model assigned to it. ModelAdmins must include a model to manage.', 1);
        }

        return $this->managedModel;
    }
1282613
public function getModel()
    {
        if ($this->_model === null) {
            $this->_model = Yii::createObject($this->modelClass);
        }

        return $this->_model;
    }
846694
protected function _model()
    {
        if ($this->_model !== null) {
            return $this->_model;
        }

        $model = 'I18nMessages';
        if (!empty($this->params['model'])) {
            $model = $this->params['model'];
        }

        return $this->_model = TableRegistry::get($model);
    }
833740
public function obj()
    {
        if ($this->obj === null) {
            $this->obj = $this->createOrLoadObj();

            if ($this->obj instanceof ModelInterface) {
                $this->objId = $this->obj->id();
            } else {
                $this->objId = null;
            }
        }

        return $this->obj;
    }
1281327
public function getModels()
    {
        $models = [];
        foreach ($this->models as $name => $model) {
            $models[$name] = $this->getModel($name);
        }

        return $models;
    }
445416
protected function getValueFromModel($model)
    {
        if ( ! ($model instanceof Model)) {
            return null;
        }

        return get_class($model)
             . static::CLASS_AND_KEY_SEPARATOR
             . $model->getKey();
    }
1278204
public function getModel($model = null)
    {
        $model          = $model ?? $this->model ?? $this->serviceAlias;
        $sl             = $this->getServiceLocator();
        $modelManager   = $sl->get(ModelManager::class);
        $model          = $modelManager->get($model);

        return $model;
    }
410583
public function getModel()
    {
        if ($this->batch) {
            $model = $this->batch->getVariable('model');
        } else {
            $model = $this->_session->model;
        }
        if (is_array($model)) {
            if ($this->modelId && isset($model['surveys'][$this->modelId])) {
                $currentFilter = $model['filter'];
                $currentFilter['gto_id_survey'] = $this->modelId;
                $data = $model['data'];
                $sort = $model['sort'];
                $model = $this->getAnswerModel($currentFilter, $data, $sort);
            } else {
                return false;
                //$model = false;
            }
        }

        $this->model = $model;

        if ($this->model->getMeta('exportPreprocess') === null) {
            $this->preprocessModel();
            $this->model->setMeta('exportPreprocess', true);
        }

        return $this->model;
    }
120875
public function getModel()
    {
        if(!$this->__model instanceof ModelInterface)
        {
            $this->__model = $this->getObject($this->__model);

            if(!$this->__model instanceof ModelInterface)
            {
                throw new \UnexpectedValueException(
                    'Model: '.get_class($this->__model).' does not implement ModelInterface'
                );
            }
        }

        return $this->__model;
    }
190862
protected function get()
    {
        if ($this->model instanceof LengthAwarePaginator) {
            return $this->model;
        }

        if ($this->relation) {
            $this->model = $this->relation->getQuery();
        }

        $this->setSort();
        $this->setPaginate();

        $this->queries->unique()->each(function ($query) {
            $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
        });

        if ($this->model instanceof Collection) {
            return $this->model;
        }

        if ($this->model instanceof LengthAwarePaginator) {
            $this->handleInvalidPage($this->model);

            return $this->model->getCollection();
        }

        throw new \Exception('Grid query error');
    }
912784
public function getModel()
    {
        if (!is_object($this->_model)) {
            $this->_model = Yii::createObject(['class' => $this->_model]);
        }
        
        return $this->_model;
    }
147007
protected function getModel ($id) {
		return isset ($this->models[$id]) ? $this->models[$id] : null;
	}