Skip to content

Commit

Permalink
Changed Content type to content type
Browse files Browse the repository at this point in the history
  • Loading branch information
Gengar-i committed Jan 8, 2024
1 parent 2ee11e7 commit e0b18ef
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/value_object_visitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ parameters:

# Field Definition

# Content Type Group
# Content type Group

# HTTP

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
</header>
<body>
<trans-unit id="2b45dddd5952fbc4a68be478515cc52de600cb1a" resname="Cannot publish an empty Content type draft">
<source>Cannot publish an empty Content type draft</source>
<target state="new">Cannot publish an empty Content type draft</target>
<note>key: Cannot publish an empty Content type draft</note>
<trans-unit id="18a38f6c46cc84d27fa3d24cbd09aee62125be8d" resname="Cannot publish an empty content type draft">
<source>Cannot publish an empty content type draft</source>
<target state="new">Cannot publish an empty content type draft</target>
<note>key: Cannot publish an empty content type draft</note>
</trans-unit>
<trans-unit id="bdee82e9de01522317ff71f03a7d9ed655a39a6f" resname="Cannot unlink the Content type from its only remaining group">
<source>Cannot unlink the Content type from its only remaining group</source>
<target state="new">Cannot unlink the Content type from its only remaining group</target>
<note>key: Cannot unlink the Content type from its only remaining group</note>
<trans-unit id="8bfebd32a3304d378cf1219c4b25b1044d9dde34" resname="Cannot unlink the content type from its only remaining group">
<source>Cannot unlink the content type from its only remaining group</source>
<target state="new">Cannot unlink the content type from its only remaining group</target>
<note>key: Cannot unlink the content type from its only remaining group</note>
</trans-unit>
<trans-unit id="0b525944af0bdcb0dd04bcaa4a027212bffc9738" resname="Current version already has DRAFT status">
<source>Current version already has DRAFT status</source>
<target state="new">Current version already has DRAFT status</target>
<note>key: Current version already has DRAFT status</note>
</trans-unit>
<trans-unit id="c29295e8c9b79fe2f6349d4d1d9c6e085c22baff" resname="Only empty Content type groups can be deleted">
<source>Only empty Content type groups can be deleted</source>
<target state="new">Only empty Content type groups can be deleted</target>
<note>key: Only empty Content type groups can be deleted</note>
<trans-unit id="f915c78ee350c1b4fb3d3adac7584a12fcc0cfdf" resname="Only empty content type groups can be deleted">
<source>Only empty content type groups can be deleted</source>
<target state="new">Only empty content type groups can be deleted</target>
<note>key: Only empty content type groups can be deleted</note>
</trans-unit>
<trans-unit id="309f294f925bf5343de6ca4507a303bbc762090f" resname="Only versions with DRAFT status can be published">
<source>Only versions with DRAFT status can be published</source>
Expand Down Expand Up @@ -56,10 +56,10 @@
<target state="new">Relation of type COMMON to the selected destination content ID already exists</target>
<note>key: Relation of type COMMON to the selected destination content ID already exists</note>
</trans-unit>
<trans-unit id="bd38127e140372b4e22052957c4864d898ebca20" resname="The Content type is already linked to the provided group">
<source>The Content type is already linked to the provided group</source>
<target state="new">The Content type is already linked to the provided group</target>
<note>key: The Content type is already linked to the provided group</note>
<trans-unit id="7d98c91ecfe4814f6268eb889de59ada9eec6a1d" resname="The content type is already linked to the provided group">
<source>The content type is already linked to the provided group</source>
<target state="new">The content type is already linked to the provided group</target>
<note>key: The content type is already linked to the provided group</note>
</trans-unit>
<trans-unit id="d71c63955373cbd73161528026feb878e5e042b8" resname="Translation can be deleted from a DRAFT version only">
<source>Translation can be deleted from a DRAFT version only</source>
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Input/ParsingDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, array $pa
}

/**
* Adds another parser for the given Content type.
* Adds another parser for the given content type.
*
* @param string $mediaType
* @param \Ibexa\Contracts\Rest\Input\Parser $parser
Expand Down Expand Up @@ -105,7 +105,7 @@ protected function internalParse(array $data, string $mediaType)
}

if (!isset($this->parsers[$mediaType][$version])) {
throw new Exceptions\Parser("Unknown Content type specification: '$mediaType (version: $version)'.");
throw new Exceptions\Parser("Unknown content type specification: '$mediaType (version: $version)'.");
}

return $this->parsers[$mediaType][$version]->parse($data, $this);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Input/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(ParsingDispatcher $parsingDispatcher, array $handler
}

/**
* Adds another handler for the given Content type.
* Adds another handler for the given content type.
*
* @param string $type
* @param \Ibexa\Contracts\Rest\Input\Handler $handler
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Input/ParserTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function parseStatus($contentTypeStatus)
return Values\ContentType\ContentType::STATUS_MODIFIED;
}

throw new \RuntimeException("Unknown Content type status '{$contentTypeStatus}.'");
throw new \RuntimeException("Unknown content type status '{$contentTypeStatus}.'");
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/lib/Server/Controller/ContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function deleteContentTypeGroup($contentTypeGroupId)

$contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
if (!empty($contentTypes)) {
throw new ForbiddenException('Only empty Content type groups can be deleted');
throw new ForbiddenException('Only empty content type groups can be deleted');
}

$this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);
Expand Down Expand Up @@ -740,7 +740,7 @@ public function publishContentTypeDraft($contentTypeId)

$fieldDefinitions = $contentTypeDraft->getFieldDefinitions();
if (empty($fieldDefinitions)) {
throw new ForbiddenException('Cannot publish an empty Content type draft');
throw new ForbiddenException('Cannot publish an empty content type draft');
}

$this->contentTypeService->publishContentTypeDraft($contentTypeDraft);
Expand Down Expand Up @@ -843,7 +843,7 @@ public function linkContentTypeToGroup($contentTypeId, Request $request)
}

if ($contentTypeInGroup) {
throw new ForbiddenException('The Content type is already linked to the provided group');
throw new ForbiddenException('The content type is already linked to the provided group');
}

$this->contentTypeService->assignContentTypeGroup(
Expand Down Expand Up @@ -885,11 +885,11 @@ public function unlinkContentTypeFromGroup($contentTypeId, $contentTypeGroupId)
}

if (!$contentTypeInGroup) {
throw new Exceptions\NotFoundException('The Content type is not in the provided group');
throw new Exceptions\NotFoundException('The content type is not in the provided group');
}

if (count($existingContentTypeGroups) == 1) {
throw new ForbiddenException('Cannot unlink the Content type from its only remaining group');
throw new ForbiddenException('Cannot unlink the content type from its only remaining group');
}

$this->contentTypeService->unassignContentTypeGroup(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Input/Parser/ContentCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$contentType->identifier}' Content type in ContentCreate."
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$contentType->identifier}' content type in ContentCreate."
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Input/Parser/UserCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $userCreateStruct->contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userCreateStruct->contentType->identifier}' Content type in UserCreate."
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userCreateStruct->contentType->identifier}' content type in UserCreate."
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Input/Parser/UserGroupCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $userGroupCreateStruct->contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userGroupCreateStruct->contentType->identifier}' Content type in UserGroupCreate."
"'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userGroupCreateStruct->contentType->identifier}' content type in UserGroupCreate."
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function serializeStatus($contentTypeStatus)
return 'MODIFIED';
}

throw new \RuntimeException("Unknown Content type status: '{$contentTypeStatus}'.");
throw new \RuntimeException("Unknown content type status: '{$contentTypeStatus}'.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Server/Values/RestContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Ibexa\Rest\Value as RestValue;

/**
* REST Content type, as received by /content/types/<ID>.
* REST content type, as received by /content/types/<ID>.
*
* Might have a "FieldDefinitionList" embedded
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/bundle/Functional/BinaryContentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private function createContentTypeWithImageAsset()
<ContentTypeCreate>
<identifier>image_asset_ct</identifier>
<names>
<value languageCode="eng-GB">Image Asset Content type</value>
<value languageCode="eng-GB">Image Asset content type</value>
</names>
<remoteId>image_asset_ct</remoteId>
<urlAliasSchema>&lt;title&gt;</urlAliasSchema>
Expand Down
2 changes: 1 addition & 1 deletion tests/bundle/Functional/ContentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ private function assertVersionResponseContainsExpectedFields(ResponseInterface $
/**
* Create new Content Draft.
*
* @param string $restContentTypeHref Content type REST resource link
* @param string $restContentTypeHref content type REST resource link
* @param string $restParentLocationHref Parent Location REST resource link
* @param string $restSectionHref Section REST resource link
* @param string $restUserHref User REST resource link
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Server/Input/Parser/ContentCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in ContentCreate.');
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in ContentCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/13',
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Server/Input/Parser/UserCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in UserCreate.');
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in UserCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/4',
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Server/Input/Parser/UserGroupCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in UserGroupCreate.');
$this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in UserGroupCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/3',
Expand Down

0 comments on commit e0b18ef

Please sign in to comment.