Register an Eloquent model that can be resolved as a Node.

@param  string  $typeName
@param  string  $modelName
@return $this
344905
public function registerModel(string $typeName, string $modelName): self
    {
        $this->nodeResolver[$typeName] = function ($id) use ($modelName) {
            return $modelName::find($id);
        };

        return $this;
    }
282235
public function create(string $className, string $typeName): Type
    {
        $description = $this->getDescription($className);

        $fieldsGetter = function () use ($className): array {
            $factory = new InputFieldsConfigurationFactory($this->types, $this->entityManager);
            $configuration = $factory->create($className);

            return $configuration;
        };

        return new InputObjectType([
            'name' => $typeName,
            'description' => $description,
            'fields' => $fieldsGetter,
        ]);
    }
378744
protected function registerFieldNameForFormTokenGeneration($fieldName)
    {
        if ($this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames')) {
            $formFieldNames = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames');
        } else {
            $formFieldNames = [];
        }
        $formFieldNames[] = $fieldName;
        $this->viewHelperVariableContainer->addOrUpdate(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formFieldNames', $formFieldNames);
    }
246958
public function create($className)
    {
        $builder = new Builder($className, $this);
        $this->getGuesser()->fill($builder);
        return $builder;
    }
1253302
public function addDataTypeDefinition($typeName, $typeClass, $classpath = null)
    {
        if (!isset($this->typedefs[$typeName])) {
            Phing::import($typeClass, $classpath);
            $this->typedefs[$typeName] = $typeClass;
            $this->project->log("  +User datatype: $typeName ($typeClass)", Project::MSG_DEBUG);
        } else {
            $this->project->log("Type $typeName ($typeClass) already registered, skipping", Project::MSG_VERBOSE);
        }
    }
563003
protected function _registerType($typename)
    {
        // Known type - return its AS name
        if (isset($this->_typesMap[$typename])) {
            return $this->_typesMap[$typename];
        }

        // Standard types
        if (in_array($typename, array('void', 'null', 'mixed', 'unknown_type'))) {
            return 'Unknown';
        }

        // Arrays
        if ('array' == $typename) {
            return 'Unknown[]';
        }

        if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) {
            return $typename;
        }

        // Resolve and store AS name
        $asTypeName = $this->_phpTypeToAS($typename);
        $this->_typesMap[$typename] = $asTypeName;

        // Create element for the name
        $typeEl = $this->_xml->createElement('type');
        $typeEl->setAttribute('name', $asTypeName);
        $this->_addClassAttributes($typename, $typeEl);
        $this->_types->appendChild($typeEl);

        return $asTypeName;
    }
1295192
public function throughJoinTable(string $tableName) : ManyToManyParentIdDefiner
    {
        return new ManyToManyParentIdDefiner($this->callback, $this->mapperLoader, $tableName, $this->bidirectionalRelationProperty,  $this->loadIds);
    }
1206932
public function toAlias($typeName)
	{
		$this->options = self::TYPE_ALIAS;
		$this->to = (string)$typeName;
		
		return $this;
	}
1142529
public function belongsTo($name, $foreignKey, $modelName = null)
    {
        $this->addAssociation('belongsTo', $name, $foreignKey, $modelName);
        return $this;
    }
711479
public function morphMany(Model $relatedModel, $morphName)
    {
        if ($relatedModel->isIgnored()) {
            return;
        }

        $this->relations->add(
            new Relations\MorphMany($this, $relatedModel, $morphName)
        );
    }
1261688
public function labelForNodeType($nodeTypeName)
    {
        if (!$this->nodeTypeManager->hasNodeType($nodeTypeName)) {
            $explodedNodeTypeName = explode(':', $nodeTypeName);

            return end($explodedNodeTypeName);
        }

        $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName);

        return $nodeType->getLabel();
    }
65331
public function orderByAsc(string $columnName) : OneToManyRelationDefiner
    {
        $this->orderByColumnNameDirectionMap[$columnName] = Ordering::ASC;

        return $this;
    }
768587
public function getModelPersister($modelName)
    {
        if (!isset($this->persisters[$modelName])) {
            $class = $this->manager->getClassMetadata($modelName);

            $this->persisters[$modelName] = new ModelPersister($this->manager, $this, $class);
        }

        return $this->persisters[$modelName];
    }
280498
public function modelFactory($modelName) {
        $modelClass = "\\Modules\\" . RouteController::$currentRoute['module'] . "\\Models\\" . $modelName;

        if (class_exists($modelClass)) {
            return new $modelClass(RouteController::$currentRoute);
        } elseif (class_exists("\\Base\\models\\" . $modelName)) {
            $baseModelClass = "\\Base\\models\\" . $modelName;
            return new $baseModelClass(RouteController::$currentRoute);
        } else {
            HookManager::call("handleModel", $modelName);
        }
    }
1331648
public function setModelName($modelName)
    {
        if (0 === strpos($modelName, '\\')) {
            $this->modelName = substr($modelName, 1);
        } else {
            $this->modelName = $modelName;
        }
        if ($this->modelName && !$this->modelTableMapName) {
            $this->modelTableMapName = constant($this->modelName . '::TABLE_MAP');
        }
        if (!$this->tableMap && $this->modelName) {
            $this->tableMap = Propel::getServiceContainer()->getDatabaseMap($this->getDbName())->getTableByPhpName($this->modelName);
        }

        return $this;
    }
785632
public function orderByDesc(string $columnName) : OneToManyRelationDefiner
    {
        $this->orderByColumnNameDirectionMap[$columnName] = Ordering::DESC;

        return $this;
    }
309001
private function toggleModel($providerName, $modelId)
    {
        $this->saveTreeNodeStates($this->getTreeNodeStates()->toggleModel($providerName, $modelId));
    }