@param string $name
@return databox_field

@throws Exception_InvalidArgument
760506
public function set_name($name)
    {
        $previous_name = $this->name;

        $name = self::generateName($name, $this->app['unicode']);

        if ($name === '') {
            throw new \Exception_InvalidArgument();
        }

        $this->name = $name;

        if ($this->name !== $previous_name) {
            $this->renamed = true;
        }

        return $this;
    }
11956
public function getFieldType($name)
    {
        return $this->checkFieldExist($name)->types[$name] != null
            ? rtrim($this->types[$name], '[]')
            : null;
    }
812101
protected function getFieldNumber($name)
    {
        $no = pg_field_num($this->handler, "\"$name\"");

        if ($no ===  -1) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Could not find field name '%s'. Available fields are {%s}.",
                    $name,
                    join(', ', array_keys(pg_fetch_assoc($this->handler)))
                )
            );
        }

        return $no;
    }
283369
private function getColumnFromName($name)
    {
        foreach ($this->columnConfiguration as $i => $col) {
            if ($col->getName() == $name) {
                return $col;
            }
        }

        // This exception should never happen. If it does, something is
        // wrong w/ the relationship between searchable columns and the
        // configuration.
        throw new DatatableException("A requested column was not found in the columnConfiguration.");
    }
908830
public function getField($name)
    {
        return (null !== $name && array_key_exists($name, $this->fields)) ? $this->fields[$name] : null;
    }
720223
public function remove_field($name){
		$ind = $this->is_field($name);
		if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
		array_splice($this->text,$ind,1);
		//we not deleting field from $data collection, so it will not be included in data operation, but its data still available
	}
512451
public function dataFieldByName($name)
    {
        if ($dataFields = $this->dataFields()) {
            foreach ($dataFields as $child) {
                if (trim($name) == trim($child->getName()) || $name == $child->id) {
                    return $child;
                }
            }
        }
        return null;
    }
196262
public function getAdapter(string $name): DatabaseImportExportAdapterInterface
    {
        if (!array_key_exists($name, $this->adapters)) {
            throw new Exception\DomainException("Database import/export adapter not found by name \"$name\".");
        }

        return $this->adapters[$name];
    }
723431
public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }
103316
public function getOneToOneField($name)
    {
        $field = $this->getField($name);

        return $field instanceof OneToOneField ? $field : null;
    }
701238
public function getColumn(string $name) : Column
    {
        $column = $this->findColumn($name);

        if (!$column) {
            throw InvalidArgumentException::format(
                'Could not get column from table \'%s\': expecting one of (%s), \'%s\' given',
                $this->name, Debug::formatValues($this->getColumnNames()), $name
            );
        }

        return $column;
    }
1297596
public function getAttribute($name)
    {
        if (!\array_key_exists($name, $this->attributes)) {
            throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name));
        }

        return $this->attributes[$name];
    }
190983
public function getOption(string $name)
    {
        if (!$this->options->offsetExists($name)) {
            throw new Exception\InvalidArgumentException("Option '$name' does not exists'");
        }

        return $this->options[$name];
    }
848540
private function instanciateField(string $name, string $type): FieldInterface
    {
        $fieldClass = $this->getFieldClass($type);
        $field = new $fieldClass($name);

        if (!$field instanceof FieldInterface) {
            throw new Exception("Field class \"{$fieldClass}\" must implements ".FieldInterface::class);
        }

        if ($field instanceof TranslatorAwareFieldInterface) {
            $field->setTranslator($this->translator);
        }
        if ($field instanceof TwigAwareFieldInterface) {
            $field->setTwig($this->twig);
        }

        return $field;
    }
847542
public function addField($name, $dataType = "varchar(255)")
    {
        if ($name == "") {
            throw new Exception("Field name cannot be empty.");
        }

        // Check if the name whether is satisfied
        if (ctype_upper($name[0])) {
            throw new Exception("Field name cannot start with upper-case.");
        }

        $this->fieldList[$name] = new Field($this, $name, $dataType);
    }
279954
public function getField($name)
		{
			return isset($this->fields[$name])
				? $this->fields[$name]
				: null;
		}
107687
public function getAdapter($name = null)
    {
        if (null === $name) {
            $name = $this->getDefaultDatasource();
        }
        if (!isset($this->adapters[$name])) {
            if (!isset($this->adapterClasses[$name])) {
                throw new AdapterException(sprintf('No adapter class defined for datasource "%s"', $name));
            }
            $this->adapters[$name] = AdapterFactory::create($this->adapterClasses[$name]);
        }

        return $this->adapters[$name];
    }