@param string|null $name

@return Field
429085
public function index($name = null)
    {
        $index = new Index(
            $this->metaDatabuilder,
            [$this->getName()]
        );

        if ($name !== null) {
            $index->name($name);
        }

        $this->callbackAndQueue($index);

        return $this;
    }
1221640
protected function newField($name=null, $data=null) {
		if($name !== null && isset($this[$name]))
			return;
		$cb = $this->cb;
		$newelement = $cb($data);
		if(!$newelement)
			return;
		$this->add($newelement, $name);
		return $newelement;
	}
633517
public function get($name)
    {
        if (isset($this->fields[$name])) {
            return $this->fields[$name];
        }

        throw new FieldException("Fielder doesn't have [$name] field registered.");
    }
931438
public function textarea($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Textarea::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
383883
public function tag($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Tag::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
1249698
public function getForeignKey($name)
    {
        $fields = $this->getForeignFields();

        return isset($fields[$name]) ? $fields[$name] : null;
    }
121010
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        $this->fieldDoesNotExist($name);
    }
846007
public function field($name)
    {
        foreach($this->data as $post)
        {
            $fieldType = get_field_object($name, $post->ID)['type'];

            if(in_array($fieldType, ['text']))
            {
                $post->$name = get_field($name, $post->ID);
            }
            elseif(in_array($fieldType, ['image']))
            {
                $post->$name = Data::arrayToObject(get_field($name, $post->ID));
            }
        }

        return $this->data;
    }
713045
public static function field($name, $id = null)
    {
        return self::getInstance()
                     ->getBuilder(FieldBehavior::class)
                     ->field($name)
                     ->id($id);
    }
133342
public function getPost(string $name = null)
    {
        if ($name === null) {
            return $this->post;
        }

        return $this->resolvePath($this->post, $name);
    }
993977
public function getField($name, $key, $default = null)
    {
        if (array_key_exists($name, $this->fields) && array_key_exists($key, $this->fields[$name])) {
            return $this->fields[$name][$key];
        }
        return $default;
    }
147709
public static function get(string $name, string $key, string $field = null)
    {
        return static::getInstance($name)->get($key, $field);
    }
858673
public function field($name)
  {
    return isset($this->fields[$name]) ? $this->fields[$name] : false;
  }
1304642
public function getShowFieldDescription($name)
    {
        $this->buildShow();

        return $this->hasShowFieldDescription($name) ? $this->showFieldDescriptions[$name] : null;
    }
1263745
public static function getHiddenField(string $name = null): string
    {
        $name = $name ?: self::$currentName;

        return sprintf('<input type="text" name="%s" style="display: none">', $name);
    }
141487
public static function buildIDField($name) {
		$field				= new static($name, 'ref');
		$TYPE				= $field->getType();
		$field->args		= $TYPE->parseArgs(array());
		$field->default		= null;
		$field->writable	= false;
		$field->nullable	= false;
		return $field;
	}
819200
public function button($value, $name = null) 
	{
		Argument::i()
			->test(1, 'string')
			->test(2, 'string', 'null')
			->test(3, 'bool');
		
		$field = Button::i()->setValue($value);
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		return $field;
	}