Retrieves a type definition.

@param string $repositoryId
@param string $typeId
@return TypeDefinitionInterface|null
@throws CmisInvalidArgumentException if repository id or type id is <code>null</code>
10284
protected function getTypeDefinitionInternal($repositoryId, $typeId)
    {
        if (empty($repositoryId)) {
            throw new CmisInvalidArgumentException('Repository id must not be empty!');
        }

        if (empty($typeId)) {
            throw new CmisInvalidArgumentException('Type id must not be empty!');
        }

        // build URL
        $url = $this->getRepositoryUrl($repositoryId, Constants::SELECTOR_TYPE_DEFINITION);
        $url->getQuery()->modify([Constants::PARAM_TYPE_ID => $typeId]);

        return $this->getJsonConverter()->convertTypeDefinition(
            (array) $this->readJson($url)
        );
    }
135334
private function loadContentType(int $contentTypeId, array $languageCodes): ContentType
    {
        return $this->repository->getContentTypeService()->loadContentType($contentTypeId, $languageCodes);
    }
606876
public Repository getRepository(String instanceId) throws WIMException {
        RepositoryWrapper repositoryHolder = repositories.get(instanceId);
        if (repositoryHolder != null) {
            return repositoryHolder.getRepository();
        }
        return null;
    }
1005522
public function read(string $identifier): ?ClientInterface
    {
        try {
            return $this->readResource($identifier);
        } catch (RepositoryException $exception) {
            $message = 'Reading client failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }
979900
public function getFieldById(ContentTypeInterface $contentType, $fieldId)
    {
        $field = $this->om->getRepository($this->configurationManager->getEntityClass('field'))->find($fieldId);


        if (!$field instanceof FieldInterface) {
            return null;
        }
        if ($field->getContentType() && $field->getContentType()->getId() == $contentType->getId()) {
            return $field;
        }

        $parent = $field;
        while ($parent && $parentLayout = $parent->getLayout()) {
            if ($parent = $parentLayout->getParent()) {
                if ($parent->getContentType() !== null && $parent->getContentType()->getId() == $contentType->getId()) {
                    return $field;
                }
            }
        }

        return null;
    }
246618
public function getContentIdsByContentTypeId($contentTypeId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query
            ->select($this->dbHandler->quoteColumn('id'))
            ->from($this->dbHandler->quoteTable('ezcontentobject'))
            ->where(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('contentclass_id'),
                    $query->bindValue($contentTypeId, null, PDO::PARAM_INT)
                )
            );

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

        return $statement->fetchAll(PDO::FETCH_COLUMN);
    }
759968
private MutableSecondaryTypeDefinition getSecondaryTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {

		final TypeDefinitionFactory factory      = TypeDefinitionFactory.newInstance();
		final MutableSecondaryTypeDefinition def = factory.createSecondaryTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_SECONDARY.value());

		def.setIsCreatable(false);

		initializeExtendedType(def, typeId);

		if (!includePropertyDefinitions) {
			def.removeAllPropertyDefinitions();
		}

		return def;
	}
1291284
protected function getEffectiveType(
        TypeInterface $variableType,
        VariableDefinitionNode $variableDefinition
    ): TypeInterface {
        return (!$variableDefinition->hasDefaultValue() || $variableType instanceof NonNullType)
            ? $variableType
            : newNonNull($variableType);
    }
955034
public static JinxConstants.MemberType typeIdToMemberType(Integer typeId) {
        if (typeId == null) {
            return null;
        }
        JinxConstants.MemberType memberType;
        switch (typeId) {
            case 1:
                memberType = JinxConstants.MemberType.narwhal;
                break;
            case 2:
                memberType = JinxConstants.MemberType.member;
                break;
            case 3:
                memberType = JinxConstants.MemberType.moderator;
                break;
            case 4:
                memberType = JinxConstants.MemberType.admin;
                break;
            default:
                memberType = null;
                break;
        }
        return memberType;
    }
786362
public function getTypeElementById( $id, $types = null )
	{
		$fragment = parse_url( $id, PHP_URL_FRAGMENT );
		$fragment = $fragment ? $fragment : $id;

		$taxonomy = $this->getTaxonomyForXSD( $id );
		if ( ! $taxonomy )
		{
			$this->log()->warning( "Unable to locate taxonomy for id '$id'" );
			return false;
		}

		if ( is_null( $types ) ) $types = XBRL_Types::getInstance();
		return $types->getElement( $fragment, $taxonomy->getPrefix() );
	}
658517
protected function getUser4Id($userId)
    {
        /** @var \PServerCore\Entity\Repository\User $userRepository */
        $userRepository = $this->entityManager->getRepository($this->collectionOptions->getEntityOptions()->getUser());

        return $userRepository->getUser4Id($userId);
    }
577207
private static String createTypeCollectionId(Collection<Type> types) {
        return types.stream()
            .sorted(comparing(CdiSpiHelper::createTypeId))
            .map(CdiSpiHelper::createTypeId)
            .collect(joining(",", "[", "]"));
    }
666177
@PostMapping(
      value = "/{entityTypeId}/{id}",
      params = "_method=GET",
      produces = APPLICATION_JSON_VALUE)
  @ResponseBody
  public Map<String, Object> retrieveEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("id") String untypedId,
      @Valid @RequestBody EntityTypeRequest request) {
    Set<String> attributesSet = toAttributeSet(request != null ? request.getAttributes() : null);
    Map<String, Set<String>> attributeExpandSet =
        toExpandMap(request != null ? request.getExpand() : null);

    EntityType meta = dataService.getEntityType(entityTypeId);
    Object id = getTypedValue(untypedId, meta.getIdAttribute());
    Entity entity = dataService.findOneById(entityTypeId, id);

    if (entity == null) {
      throw new UnknownEntityException(meta, untypedId);
    }

    return getEntityAsMap(entity, meta, attributesSet, attributeExpandSet);
  }
500141
public function loadTypeData($typeId, $status)
    {
        $q = $this->getLoadTypeQueryBuilder();
        $q
            ->where($q->expr()->eq('c.id', ':id'))
            ->andWhere($q->expr()->eq('c.version', ':version'))
            ->setParameter('id', $typeId, ParameterType::INTEGER)
            ->setParameter('version', $status, ParameterType::INTEGER);

        return $q->execute()->fetchAll();
    }
467579
@Override
    public ITypedReferenceableInstance getEntityDefinition(String guid) throws AtlasException {
        guid = ParamChecker.notEmpty(guid, "entity id");

        final ITypedReferenceableInstance instance = repository.getEntityDefinition(guid);
        return instance;
    }
451542
public function store($contentId)
    {
        $content = $this->repository->getById($contentId);
        if (!empty($content)) {
            $this->authorize('create', $content);
            $this->authorize('update', $content);
            if ($content->type != 'category') {
                $input = $this->validator->validate('create');
                $route = $this->repository->createRoute($content, $input['lang_code'], $input['url']);
                return $this->respondWithSuccess($route, new RouteTransformer);
            } else {
                // TODO categories children route update
                throw new RepositoryValidationException("You can't change category url", 500);
            }
        }
        return $this->respondNotFound();
    }
972569
public function getAllPageIdsAndNamesBySiteThenType($siteId, $type)
    {
        $queryBuilder = $this->_em->createQueryBuilder();

        $queryBuilder->select('page.name, page.pageId')
            ->from(\Rcm\Entity\Page::class, 'page')
            ->join('page.site', 'site')
            ->where('page.pageType = :pageType')
            ->andWhere('site.siteId = :siteId')
            ->setParameter('pageType', $type)
            ->setParameter('siteId', $siteId);

        $result = $queryBuilder->getQuery()->getArrayResult();

        if (empty($result)) {
            return null;
        }

        $return = [];

        foreach ($result as &$page) {
            $return[$page['pageId']] = $page['name'];
        }

        return $return;
    }