Retrieve Object Type Name from an Object Identifier String

@param string $fieldId Object Identifier String

@return false|string
424224
public static function objectType($fieldId)
    {
        //====================================================================//
        // decode
        $result = self::isIdField($fieldId);
        if (empty($result)) {
            return false;
        }
        //====================================================================//
        // Return Field Identifier
        return   $result['ObjectType'];
    }
536631
public static function findField($fieldsList, $fieldId)
    {
        $fields = self::filterFieldList($fieldsList, $fieldId);

        if (1 != count($fields)) {
            return null;
        }

        return array_shift($fields);
    }
929161
private function getTypeDefinition($objectTypeId)
    {
        if (empty($objectTypeId) || !is_string($objectTypeId)) {
            throw new CmisInvalidArgumentException(
                'Type property must be set and must be of type string but is empty or not a string.'
            );
        }

        return $this->session->getTypeDefinition($objectTypeId);
    }
514670
public function prepareFieldName($fieldName)
    {
        list($fieldName) = $this->prepareQueryElement($fieldName, null, null, false);

        return $fieldName;
    }
818055
public function getDsIdsByFieldType($fieldType)
    {
        $result = [];
        foreach ($this->dsIdMap as $dsId => $node) {
            /* @var $node ElementtypeStructureNode */
            if ($fieldType === $node->getType()) {
                $result[] = $dsId;
            }
        }

        return $result;
    }
721593
public function getFieldType($identifier)
    {
        if (!isset($this->fieldTypes[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        if ($this->fieldTypes[$identifier] instanceof SPIFieldType) {
            return $this->fieldTypes[$identifier];
        } elseif (is_callable($this->fieldTypes[$identifier])) {
            /** @var $closure \Closure */
            $closure = $this->fieldTypes[$identifier];
            $this->fieldTypes[$identifier] = $closure();
        }

        if (!$this->fieldTypes[$identifier] instanceof SPIFieldType) {
            throw new RuntimeException("\$fieldTypes[$identifier] must be instance of SPI\\FieldType\\FieldType or callable");
        }

        return $this->fieldTypes[$identifier];
    }
475872
public function getFieldName(SPIValue $value, FieldDefinition $fieldDefinition, $languageCode)
    {
        return $this->fieldType->getName($value);
    }
873796
public function getFieldNameByBaseType($base_type)
    {
        $this->getTableInfo();
        $field = null;
        if (isset($this['fields'])) {
            if (isset($this['fields'][$base_type])) {
                $field = $base_type;
            }
            foreach ($this['fields'] as $v) {
                if (isset($v['base_type']) && $v['base_type'] == $base_type) {
                    $field = $v['field_name'];
                    break;
                }
            }
        }
        
        return $field;
    }
31108
public static function getNeoBlockType($handle, $fieldId)
    {
        $neo = Craft::$app->plugins->getPlugin('neo');
        $blockTypes = $neo->blockTypes->getByFieldId($fieldId);
        foreach ($blockTypes as $block) {
            if ($block->handle == $handle) {
                return $block;
            }
        }

        return false;
    }
1326370
public function getFieldNum($fieldName)
    {
        foreach( $this->_fields as $field ) {
            if( $field->name == $fieldName ) {
                return $field->number;
            }
        }

        return -1;
    }
635995
protected function getAssignedKeywords($fieldId)
    {
        $dbHandler = $this->getConnection();

        $query = $dbHandler->createSelectQuery();
        $query->select('keyword')
            ->from($dbHandler->quoteTable('ezkeyword'))
            ->innerJoin(
                $dbHandler->quoteTable('ezkeyword_attribute_link'),
                $query->expr->eq(
                    $dbHandler->quoteColumn('id', 'ezkeyword'),
                    $dbHandler->quoteColumn('keyword_id', 'ezkeyword_attribute_link')
                )
            )
            ->where(
                $query->expr->eq(
                    $dbHandler->quoteColumn('objectattribute_id', 'ezkeyword_attribute_link'),
                    $fieldId
                )
            );

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(\PDO::FETCH_COLUMN, 0);
    }
715499
protected function getId($fieldId, $fieldName)
	{
		$id = '';

		// If there is a form control set for the attached form add it first.
		if ($this->formControl)
		{
			$id .= $this->formControl;
		}

		// If the field is in a group add the group control to the field id.
		if ($this->group)
		{
			// If we already have an id segment add the group control as another level.
			if ($id)
			{
				$id .= '_' . str_replace('.', '_', $this->group);
			}
			else
			{
				$id .= str_replace('.', '_', $this->group);
			}
		}

		// If we already have an id segment add the field id/name as another level.
		if ($id)
		{
			$id .= '_' . ($fieldId ? $fieldId : $fieldName);
		}
		else
		{
			$id .= ($fieldId ? $fieldId : $fieldName);
		}

		// Clean up any invalid characters.
		$id = preg_replace('#\W#', '_', $id);

		return $id;
	}
761645
protected function fetchUserId($fieldId)
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->select(
                $this->connection->quoteIdentifier('contentobject_id')
            )
            ->from($this->connection->quoteIdentifier('ezcontentobject_attribute'))
            ->where(
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('id'),
                    ':fieldId'
                )
            )
            ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT)
        ;

        $statement = $query->execute();

        return (int) $statement->fetchColumn();
    }
349048
public function get_page_type_idstring($id) {
        foreach ($this->types as $pagetype) {
            if ((int)$pagetype->typeid === (int)$id) {
                return $pagetype->idstring;
            }
        }
        return 'unknown';
    }
872694
public static function getMatrixBlockType($handle, $fieldId)
    {
        $blockTypes = Craft::$app->matrix->getBlockTypesByFieldId($fieldId);
        foreach ($blockTypes as $block) {
            if ($block->handle == $handle) {
                return $block;
            }
        }

        return false;
    }
1374160
public static function getLabelSelector($formName, $fieldId)
    {
        $formSelector = static::getFormByNameSelector($formName);
        $fieldId = trim($fieldId);

        if (empty($formSelector) || empty($fieldId)) {
            return '';
        }

        return sprintf('%s label[for="%s"]', $formSelector, $fieldId);
    }
1283803
public function getField($fieldId)
    {
        $resolved = $this->getResolved();
        if (!$resolved instanceof ContentTypeInterface) {
            return null;
        }

        return $resolved->getField($fieldId);
    }