@param string       $name       Field name
@param Schema\Field $definition Field

@return DefinitionElementInterface
506582
private function processSimpleField($name, Schema\Field $definition)
    {
        if (strpos($definition->getType(), 'class:') === 0) {
            $field = new JsonDefinitionRel($name, $definition, $this->getRelation($name));
        } else {
            $field = new JsonDefinitionField($name, $definition);
        }

        if (substr($definition->getType(), -2) === '[]') {
            $field = new JsonDefinitionArray($name, $field);
        }

        return $field;
    }
363294
protected function _service($name, $definition, $params)
    {
        if ($definition instanceof Closure) {
            $type = 'singleton';
            $definition = call_user_func_array($definition, $params);
            $this->_definitions[$name] = compact('definition', 'type');
        }
        return $definition;
    }
1109450
public function prependCell($definition, $name = null)
    {
        $this->getCells()->prependCell($definition, $name);
        return $this;
    }
1292091
public function hasField($name)
    {
        if ($name instanceof Field) {
            return $name;
        }

        $f_object = $this->hasElement($name);
        if (!$f_object || !$f_object instanceof Field) {
            return false;
        }

        return $f_object;
    }
1045910
public function getFieldByName(string $name)
    {
        $found = array_filter($this->fields, function ($field) use ($name) {
            /** @var FieldTypeInterface $field */
            return $name === $field->getBaseName();
        });

        if (! empty($found)) {
            return array_pop($found);
        }

        throw new TaxonomyFieldNotFoundException("Taxonomy field with a name of {$name} not found.");
    }
594018
public function getOptionalField(string $name) : string
    {
        if (isset($this->fields[$name])) {
            if ($this->fields[$name]) {
                return \array_shift($this->fields[$name]);
            }
        }

        return '';
    }
1053289
public function getField($name)
    {
        return $this->fields->has($name) ? $this->fields[$name] : null;
    }
811852
public function bindFactory(string $name, $definition)
    {
        $this->definitions[$name] = new Factory($name, $definition);
        return $this;
    }
261426
protected function createParameter(string $name, string $in, \stdClass $definition)
    {
        $schema   = $this->createParameterSchema($definition);
        $required = isset($definition->required) && $definition->required;

        return new Parameter($name, $required, $schema, $in);
    }
75184
public static function hasDirectiveDefinition(Node $definitionNode, string $name): bool
    {
        return (new Collection($definitionNode->directives))
            ->contains(function (DirectiveNode $directiveDefinitionNode) use ($name): bool {
                return $directiveDefinitionNode->name->value === $name;
            });
    }
417110
public function getFieldByName($name)
    {
        foreach ($this->fields as $field) {
            if ($field->getName() == $name) {
                return $field;
            }
        }

        return null;
    }
164718
public function getColumn(string $name): AbstractColumn
    {
        if (!$this->schema->hasColumn($name)) {
            throw new DefinitionException("Undefined column {$name} in {$this->schema->getName()}");
        }

        return clone $this->schema->column($name);
    }
302849
final function FieldMapper($name)
    {
        $fieldMappers = $this->FieldMappers();
        if (!array_key_exists($name, $fieldMappers))
            throw new \InvalidArgumentException($name . ' is not a field of ' . $this->TableName());
        
        return $fieldMappers[$name];
    }
554236
public function getFormElementDefinition($name)
    {
        if (array_key_exists($name, $this->namedFields)) {
            return $this->namedFields[$name];
        }

        throw new CMDLParserException('Could not find a formelement named ' . $name,
            CMDLParserException::CMDL_FORMELEMENT_NOT_FOUND);
    }
891513
public function element(string $name): ElementInterface
    {
        if (! isset($this->elements[$name])) {
            throw new ElementNotFoundException(
                sprintf('The element with name <code>%s</code> does not exists', $name)
            );
        }

        return $this->elements[$name];
    }
1125306
public function getField($name)
    {
        if ('pk' === $name) {
            $name = $this->getPrimaryKeyName();
        }

        $name = $this->getMappingName($name);

        if (isset($this->fields[$name])) {
            $field = $this->fields[$name];
            $field->cleanValue();

            return $field;
        }
    }
1162467
public function newForm($name, array $definition)
    {
        $container = ContainerBuilder::buildContainer([
            $name => Definition::object('Slick\Form\Form')
                ->constructor([$name])
        ]);

        $this->_form = $container->get($name);

        foreach ($definition as $name => $element) {
            $this->addElement($this->_form, $name, $element);
        }
        return $this->_form;
    }