@param string $resourceType
@param string $name
@param array|JsonSerializable|CustomField $data

@throws UnprocessableEntityException The input data does not valid

@return CustomField
767519
public function update($resourceType, $name, $data)
    {
        return $this->client()->put($data, 'custom-fields/{resourceType}/{name}', [
            'resourceType' => $resourceType,
            'name' => $name,
        ]);
    }
390731
protected function getResourceType($name)
    {
        if (!isset($this->types[$name])) {
            $template = $this->parser->parse($name);
            if ($template instanceof TemplateReferenceInterface) {
                $this->types[$name] = $template->get('engine');
            }
        }
        if (!isset($this->types[$name])) {
            throw new \RuntimeException("Could not load the given resource.");
        }

        return $this->types[$name];
    }
873166
public static function createColumnDefinition($datatype, $name, $tableName = null, $schemaName = null)
    {
        if (!array_key_exists($datatype, self::$typesMap)) {
            throw new Exception\UnsupportedTypeException(__METHOD__ . " Type '$datatype' is not supported.");
        }
        $class = __NAMESPACE__ . '\\Column\\' . self::$typesMap[$datatype];

        return new $class($name, $tableName, $schemaName);
    }
890774
public function createFromImportedData($name, $data)
    {
        if (!is_array($data)) {
            return new GroupParameter($name, [$data]);
        } elseif (!$this->isAssociativeArray($data)) {
            return new GroupParameter($name, $data);
        }
        $parameter = new GroupParameter($name);
        foreach ($data as $childName => $childData) {
            $parameter->addChild($this->createFromImportedData($childName, $childData));
        }
        return $parameter;
    }
148328
public function of($name, $callback = null)
    {

        $type = $this->definition['name'];

        if (is_null($type) || !property_exists($this, $type)) {
            throw new RuntimeException('Not supported.');
        } elseif (!isset($this->keyMap[$name])) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        $id = $this->keyMap[$name];

        if (is_callable($callback)) {
            call_user_func($callback, $this->{$type}[$id]);
        }


        return $this->{$type}[$id];
    }
128275
public function embedData($data, $name, $contentType = null)
    {
        $embed = $this->createEmbedViaData($data, $name, $contentType);

        return $this->getSwiftMessage()->embed($embed);
    }
725793
public function render($name, $data)
    {
        if (isset($data['value'])) {
            $value = $data['value'];
            unset($data['value']);
        } elseif (isset($data['name'])) {
            $value = $this->request->getInput($data['name'], '');
        } else {
            $value = null;
        }

        $method = '_render_' . $name;
        if (method_exists($this, $method)) {
            return $this->$method($data, $value);
        } else {
            throw new InvalidArgumentException(['`:type` type is not exist', 'type' => $name]);
        }
    }
1247707
public function embedData($data, $name, $contentType = null)
    {
        $image = new Swift_Image($data, $name, $contentType);

        return $this->swift->embed($image);
    }
211507
public function _cast($name, $data, $options)
    {
        if ($data === null) {
            return;
        }
        if ($data instanceof Document) {
            return $data;
        }

        $class = ltrim($options['class'], '\\');

        $config = [
            'schema'    => $class === Document::class ? $this : null,
            'basePath'  => $options['basePath'],
            'exists'    => $options['exists'],
            'defaults'  => $options['defaults']
        ];
        if (isset($options['config'])){
            $config = Set::extend($config, $options['config']);
        }

        $column = isset($this->_columns[$name]) ? $this->_columns[$name] : [];
        if (!empty($column['format'])) {
            $data = $this->convert('cast', $column['format'], $data, $column, $config);
        }

        return $class::create($data ? $data : [], $config);
    }
376999
public function get_custom_field_by_name($name_custom_field, $post_type){
    global $wpdb;

    $query = sprintf(
      'SELECT * FROM %s WHERE name = "%s" AND post_type = "%s" ',
      MF_TABLE_CUSTOM_FIELDS,
      $name_custom_field,
      $post_type
    );
    $field = $wpdb->get_row( $query, ARRAY_A);
    return $field;
  }
313493
public function registerCustomDoctrineType($class, $name, $type)
    {
        if (! $this->connection->isDoctrineAvailable()) {
            throw new RuntimeException(
                'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).'
            );
        }

        if (! Type::hasType($name)) {
            Type::addType($name, $class);

            $this->connection
                ->getDoctrineSchemaManager()
                ->getDatabasePlatform()
                ->registerDoctrineTypeMapping($type, $name);
        }
    }
385125
public function createExtendedCollection($name, MkCol $mkCol)
    {
        $isCalendar = false;
        $isSubscription = false;
        foreach ($mkCol->getResourceType() as $rt) {
            switch ($rt) {
                case '{DAV:}collection':
                case '{http://calendarserver.org/ns/}shared-owner':
                    // ignore
                    break;
                case '{urn:ietf:params:xml:ns:caldav}calendar':
                    $isCalendar = true;
                    break;
                case '{http://calendarserver.org/ns/}subscribed':
                    $isSubscription = true;
                    break;
                default:
                    throw new DAV\Exception\InvalidResourceType('Unknown resourceType: '.$rt);
            }
        }

        $properties = $mkCol->getRemainingValues();
        $mkCol->setRemainingResultCode(201);

        if ($isSubscription) {
            if (!$this->caldavBackend instanceof Backend\SubscriptionSupport) {
                throw new DAV\Exception\InvalidResourceType('This backend does not support subscriptions');
            }
            $this->caldavBackend->createSubscription($this->principalInfo['uri'], $name, $properties);
        } elseif ($isCalendar) {
            $this->caldavBackend->createCalendar($this->principalInfo['uri'], $name, $properties);
        } else {
            throw new DAV\Exception\InvalidResourceType('You can only create calendars and subscriptions in this collection');
        }
    }
1166118
protected function _renderNode($type, $name, $data)
    {
        $typeAlias = str_replace(' ', '-', strtolower($type));
        ?>
        <li class="jbchild">
            <div class="jbelement">
                <span class="jbname"><?php echo $name; ?></span>
                (<span class="jbtype jbtype-<?php echo $typeAlias; ?>"><?php echo $type; ?></span>)
                <span class="jbvalue"><?php echo $data; ?></span>
            </div>
        </li>
    <?php
    }
1161577
public function set_field( $name, $data = null ) {

		if ( Pod::$deprecated_notice ) {
			pods_deprecated( 'Pods::set_field', '2.0' );
		}

		$this->obj->row[ $name ] = $data;

		return $this->obj->row[ $name ];
	}
1316196
public function map($name, $data)
    {
        return new Facet\ContentTypeFacet(
            array(
                'name' => (string)substr($name, 6),
                'entries' => $this->mapData($data),
            )
        );
    }
762943
public function contentTypeEdit(
        ContentTypeEditData $data = null,
        ?string $name = null,
        array $options = []
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ContentTypeEditType::class);

        return $this->formFactory->createNamed($name, ContentTypeEditType::class, $data, $options);
    }
33507
public static Resource child(@NotNull Resource parentResource, @NotNull String name, @NotNull String resourceType) {
    return child(parentResource, name, resourceType, ValueMap.EMPTY);
  }