show detail of model

@param Model $model
@return void
431149
protected function showDetail(Model $model)
    {
        $name = $this->manager->getClassName($model);

        $this->title("Summary of Model {$name} :");

        $summary = $this->manager->getModelSummary($name);
        $rows = [];

        foreach ($summary as $key => $value) {
            if (is_bool($value)) {
                $value = $value ? 'yes' : 'no';
            }

            $valueText = $this->paintString($value, 'brown');

            $rows[] = [$key, $valueText];
        }

        $this->table(['Key', 'Value'], $rows);

        $this->showDatabaseFields($model);
        $this->showRelatoins($model);
        $this->showModifier($model);
    }
315855
public function collectDetails($viewModel)
    {
        if (app()->environment('local') || request('debug') == true) {
            $debugbar = app('debugbar');

            if ($debugbar->shouldCollect('auto_views')) {
                $debugbar['auto_views']->addDetails($viewModel);
            }
        }
    }
104031
public function getCount(Model $model) {
        return $model->find('count', array(
            'cache' => $model->alias . '::getCount',
            'cacheExpires' => $this->getExpiration($model)
        ));
    }
1278781
public function render(Model $model, $source)
    {
        return view(static::VIEW, [
            'color' => $this->resolveModelSource($model, $source),
        ]);
    }
348790
public function collectDetails($viewModel)
    {
        if (checkDebugbar()) {
            $debugbar = app('debugbar');

            if ($debugbar->shouldCollect('auto_views')) {
                $debugbar['auto_views']->addDetails($viewModel);
            }
        }
    }
87833
public function creating(Model $model)
    {
        $model->created_at = time();
        $model->created_by = $this->guard->check() ? $this->guard->user()->getId() : null;
    }
1256498
public function process(Model $model)
    {
        $data = $model->getData() ? 'TRUE' : 'FALSE';
        return $this->pool->render->renderSingleChild(
            $model->setData($data)
                ->setNormal($data)
                ->setType(static::TYPE_BOOL)
        );
    }
945173
public function update(Model $model) {

		return $this->_populate(
			$this->_request('put', $this->_getUrl('element', $model->getPrimaryKey()), [
				'json' => $model->getAttributes()
			]),
			false
		);
	}
1049648
public function getModelLinks(Model $model) {
        $models = Configure::read('Admin.modelLinks');

        if (isset($models[$model->qualifiedName])) {
            return $models[$model->qualifiedName];
        }

        return array();
    }
783224
public function handle($model)
    {
        if (! $model -> isUserstamping()) {
            return;
        }

        if (is_null($model -> {$model -> getDeletedByColumn()})) {
            $model -> {$model -> getDeletedByColumn()} = auth() -> id();
        }

        $dispatcher = $model -> getEventDispatcher();

        $model -> unsetEventDispatcher();

        $model -> save();

        $model -> setEventDispatcher($dispatcher);
    }
1221260
public function creating(Model $model)
    {
        if ($model instanceof SingleSiteInterface) {
            $site = $this->router->getActiveSite() ?: $this->site->findDefault();

            $model->{SingleSiteInterface::ATTR_SITE} = ($site ? $site->getId() : null);
        }
    }
681889
protected function loadRelatedModels(Model $model) {
        // get the relations to load
        $relations = $this->exposedRelationsFromRequest($model);

        foreach ($relations as $relation) {
            // if this relation is loaded via a method, then call said method
            if (in_array($relation, $model->relationsFromMethod())) {
                $model->$relation = $model->$relation();
                continue;
            }

            $model->load($relation);
        }
    }
1213748
public function flush($model)
    {
        if (! $this->shouldMaintainIndex($model)) {
            return;
        }

        $indexColumn = $this->getIndexColumn($model);

        $this->database
            ->table($model->searchableAs())
            ->update([$indexColumn => null]);
    }
1159081
public function process(Model $model)
    {
        $data = 'NULL';
        return $this->pool->render->renderSingleChild(
            $model->setData($data)->setNormal($data)->setType(static::TYPE_NULL)
        );
    }
612064
protected function invalidate(Model $model): void
    {
        $key = $this->prefix . ":" . $model->getKey();
        if ($this->cacheRepository->has($key)) {
            $this->cacheRepository->forget($key);
        }
        $this->cacheRepository->forget("$this->prefix.:all");
    }
1203944
public function render(Model $model, $source)
    {
        $count = $this->getCount(
            $this->getActualNestedRelation($model, $source)
        );

        if ( ! $count) {
            return '<span class="relation-count count-empty">&nbsp;</span>';
        }

        return '<span class="relation-count">' . $count . '</span>';
    }
328300
protected function saveBelongsToRelations(Model $model)
    {
        foreach ($model->getRelations() as $name => $relation) {
            if ($model->{$name}() instanceof BelongsTo && ! is_null($relation)) {
                $relation->save();
                $model->{$name}()->associate($relation);
            }
        }
    }