Skip to content

Commit 87ab607

Browse files
committed
Update changes from ibexa/core#463
1 parent 0ca08e8 commit 87ab607

16 files changed

+471
-385
lines changed

docs/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-FieldType-FieldType.html

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39139,21 +39139,20 @@ <h4>Parameters</h4>
3913939139
<h4>Return values</h4>
3914039140
<p class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</p>
3914139141
<section class="phpdocumentor-description">
39142-
<p>Hash with relation type as key and array of destination content ids as value.</p>
39143-
<p>Example:
39144-
<code class="prettyprint">
39145-
array(
39146-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK =&gt; array(
39147-
&quot;contentIds&quot; =&gt; array( 12, 13, 14 ),
39148-
&quot;locationIds&quot; =&gt; array( 24 )
39149-
),
39150-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED =&gt; array(
39151-
&quot;contentIds&quot; =&gt; array( 12 ),
39152-
&quot;locationIds&quot; =&gt; array( 24, 45 )
39153-
),
39154-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD =&gt; array( 12 )
39155-
)
39156-
</code></p>
39142+
<p>Hash with relation type as key and array of destination content IDs as value.</p>
39143+
<p>Example:</p>
39144+
<pre class="prettyprint"><code class="prettyprint">[
39145+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK =&gt; [
39146+
'contentIds' =&gt; [12, 13, 14],
39147+
'locationIds' =&gt; [24]
39148+
],
39149+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED =&gt; [
39150+
'contentIds&quot; =&gt; [12],
39151+
'locationIds' =&gt; [24, 45]
39152+
],
39153+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD =&gt; [12]
39154+
]
39155+
</code></pre>
3915739156

3915839157
</section>
3915939158

@@ -39258,20 +39257,19 @@ <h3 id="method_getValidatorConfigurationSchema">
3925839257
<p>Best practice:</p>
3925939258
<p>It is considered best practice to return a hash map, which contains
3926039259
rudimentary settings structures, like e.g. for the &quot;ezstring&quot; FieldType</p>
39261-
<code class="prettyprint">
39262-
array(
39263-
'stringLength' => array(
39264-
'minStringLength' => array(
39265-
'type' => 'int',
39266-
'default' => 0,
39267-
),
39268-
'maxStringLength' => array(
39269-
'type' => 'int'
39270-
'default' => null,
39271-
)
39272-
),
39273-
);
39274-
</code>
39260+
<pre class="prettyprint"><code class="prettyprint">[
39261+
'stringLength' =&gt; [
39262+
'minStringLength' =&gt; [
39263+
'type' =&gt; 'int',
39264+
'default' =&gt; 0,
39265+
],
39266+
'maxStringLength' =&gt; [
39267+
'type' =&gt; 'int'
39268+
'default' =&gt; null,
39269+
],
39270+
],
39271+
];
39272+
</code></pre>
3927539273

3927639274
</section>
3927739275

docs/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-FieldType-Generic-Type.html

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -39237,21 +39237,20 @@ <h4>Parameters</h4>
3923739237
<h4>Return values</h4>
3923839238
<p class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</p>
3923939239
<section class="phpdocumentor-description">
39240-
<p>Hash with relation type as key and array of destination content ids as value.</p>
39241-
<p>Example:
39242-
<code class="prettyprint">
39243-
array(
39244-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK =&gt; array(
39245-
&quot;contentIds&quot; =&gt; array( 12, 13, 14 ),
39246-
&quot;locationIds&quot; =&gt; array( 24 )
39247-
),
39248-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED =&gt; array(
39249-
&quot;contentIds&quot; =&gt; array( 12 ),
39250-
&quot;locationIds&quot; =&gt; array( 24, 45 )
39251-
),
39252-
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD =&gt; array( 12 )
39253-
)
39254-
</code></p>
39240+
<p>Hash with relation type as key and array of destination content IDs as value.</p>
39241+
<p>Example:</p>
39242+
<pre class="prettyprint"><code class="prettyprint">[
39243+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK =&gt; [
39244+
'contentIds' =&gt; [12, 13, 14],
39245+
'locationIds' =&gt; [24]
39246+
],
39247+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED =&gt; [
39248+
'contentIds&quot; =&gt; [12],
39249+
'locationIds' =&gt; [24, 45]
39250+
],
39251+
\Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD =&gt; [12]
39252+
]
39253+
</code></pre>
3925539254

3925639255
</section>
3925739256

@@ -39356,20 +39355,19 @@ <h3 id="method_getValidatorConfigurationSchema">
3935639355
<p>Best practice:</p>
3935739356
<p>It is considered best practice to return a hash map, which contains
3935839357
rudimentary settings structures, like e.g. for the &quot;ezstring&quot; FieldType</p>
39359-
<code class="prettyprint">
39360-
array(
39361-
'stringLength' => array(
39362-
'minStringLength' => array(
39363-
'type' => 'int',
39364-
'default' => 0,
39365-
),
39366-
'maxStringLength' => array(
39367-
'type' => 'int'
39368-
'default' => null,
39369-
)
39370-
),
39371-
);
39372-
</code>
39358+
<pre class="prettyprint"><code class="prettyprint">[
39359+
'stringLength' =&gt; [
39360+
'minStringLength' =&gt; [
39361+
'type' =&gt; 'int',
39362+
'default' =&gt; 0,
39363+
],
39364+
'maxStringLength' =&gt; [
39365+
'type' =&gt; 'int'
39366+
'default' =&gt; null,
39367+
],
39368+
],
39369+
];
39370+
</code></pre>
3937339371

3937439372
</section>
3937539373

@@ -40100,19 +40098,18 @@ <h3 id="method_checkValueType">
4010040098
<div class="phpdocumentor-label-line">
4010140099
</div>
4010240100
<section class="phpdocumentor-description">
40103-
<p>This is an operation method for <abbr title="\Ibexa\Contracts\Core\FieldType\Generic\acceptValue()">acceptValue()</abbr>.</p>
40101+
<p>This is an operation method for <a href="classes/Ibexa-Contracts-Core-FieldType-Generic-Type.html#method_acceptValue"><abbr title="\Ibexa\Contracts\Core\FieldType\Generic\Type::acceptValue()">Type::acceptValue()</abbr></a>.</p>
4010440102
<p>Default implementation expects the value class to reside in the same namespace as its
4010540103
FieldType class and is named &quot;Value&quot;.</p>
40106-
<p>Example implementation:
40107-
<code class="prettyprint">
40108-
protected function checkValueType($value): void
40109-
{
40110-
if ( !$inputValue instanceof \My\FieldType\CookieJar\Value ) )
40111-
{
40112-
throw new InvalidArgumentException( &quot;Given value type is not supported.&quot; );
40113-
}
40114-
}
40115-
</code></p>
40104+
<p>Example implementation:</p>
40105+
<pre class="prettyprint"><code class="prettyprint"> protected function checkValueType($value): void
40106+
{
40107+
if (!$inputValue instanceof \My\FieldType\CookieJar\Value))
40108+
{
40109+
throw new InvalidArgumentException(&quot;Given value type isn't supported.&quot;);
40110+
}
40111+
}
40112+
</code></pre>
4011640113

4011740114
</section>
4011840115
<h4>Parameters</h4>
@@ -40138,7 +40135,7 @@ <h4>Parameters</h4>
4013840135
</td>
4013940136
<td>
4014040137
<section class="phpdocumentor-description">
40141-
<p>A value returned by <abbr title="\Ibexa\Contracts\Core\FieldType\Generic\createValueFromInput()">createValueFromInput()</abbr>.</p>
40138+
<p>A value returned by <a href="classes/Ibexa-Contracts-Core-FieldType-Generic-Type.html#method_createValueFromInput"><abbr title="\Ibexa\Contracts\Core\FieldType\Generic\Type::createValueFromInput()">Type::createValueFromInput()</abbr></a>.</p>
4014240139

4014340140
</section>
4014440141

@@ -40202,19 +40199,18 @@ <h3 id="method_createValueFromInput">
4020240199
<section class="phpdocumentor-description">
4020340200
<p>If given $inputValue could not be converted or is already an instance of dedicate value object,
4020440201
the method should simply return it.</p>
40205-
<p>This is an operation method for <abbr title="\Ibexa\Contracts\Core\FieldType\Generic\acceptValue()">acceptValue()</abbr>.</p>
40206-
<p>Example implementation:
40207-
<code class="prettyprint">
40208-
protected function createValueFromInput( $inputValue )
40209-
{
40210-
if ( is_array( $inputValue ) )
40211-
{
40212-
$inputValue = \My\FieldType\CookieJar\Value( $inputValue );
40213-
}</p>
40214-
<pre class="prettyprint"><code class="prettyprint"> return $inputValue;
40202+
<p>This is an operation method for <a href="classes/Ibexa-Contracts-Core-FieldType-Generic-Type.html#method_acceptValue"><abbr title="\Ibexa\Contracts\Core\FieldType\Generic\Type::acceptValue()">Type::acceptValue()</abbr></a>.</p>
40203+
<p>Example implementation:</p>
40204+
<pre class="prettyprint"><code class="prettyprint"> protected function createValueFromInput($inputValue)
40205+
{
40206+
if (is_array($inputValue))
40207+
{
40208+
$inputValue = \My\FieldType\CookieJar\Value($inputValue);
40209+
}
40210+
40211+
return $inputValue;
40212+
}
4021540213
</code></pre>
40216-
<p>}
40217-
</code></p>
4021840214

4021940215
</section>
4022040216
<h4>Parameters</h4>

docs/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-FieldType-Generic-ValidationError-ConstraintViolationAdapter.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<title>ConstraintViolationAdapter | PHP API Reference (Ibexa Documentation)</title>
66

77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<meta name="description" content="{@see \Symfony\Component\Validator\ConstraintViolationInterface} to
9-
{@see \Ibexa\Contracts\Core\FieldType\ValidationError} adapter." />
8+
<meta name="description" content="Constraint violation validation error." />
109

1110
<base href="../">
1211
<link rel="icon" href="images/favicon.png"/>
@@ -38314,7 +38313,7 @@ <h1 id="ConstraintViolationAdapter">
3831438313
<div class="content-header__found-in copy-to-clipboard" data-copy-value="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">
3831538314
<abbr title="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">ConstraintViolationAdapter.php</abbr>
3831638315
:
38317-
<span title="at line 20">20</span>
38316+
<span title="at line 22">22</span>
3831838317
<img src="./images/copy.svg" title="Copy path" />
3831938318
</div>
3832038319

@@ -38324,10 +38323,14 @@ <h1 id="ConstraintViolationAdapter">
3832438323
<a href="classes/Ibexa-Contracts-Core-FieldType-ValidationError.html"><abbr title="\Ibexa\Contracts\Core\FieldType\ValidationError">ValidationError</abbr></a> </div>
3832538324

3832638325
</div>
38327-
<p>{@see \Symfony\Component\Validator\ConstraintViolationInterface} to
38328-
{@see \Ibexa\Contracts\Core\FieldType\ValidationError} adapter.</p>
38326+
<p>Constraint violation validation error.</p>
3832938327

3833038328

38329+
<section class="phpdocumentor-description">
38330+
<p>Adapts <abbr title="\Symfony\Component\Validator\ConstraintViolationInterface">ConstraintViolationInterface</abbr> to
38331+
<a href="classes/Ibexa-Contracts-Core-FieldType-ValidationError.html"><abbr title="\Ibexa\Contracts\Core\FieldType\ValidationError">ValidationError</abbr></a>.</p>
38332+
38333+
</section>
3833138334

3833238335

3833338336

@@ -38354,7 +38357,7 @@ <h3 id="method___construct">
3835438357
<div class="content-header__found-in copy-to-clipboard" data-copy-value="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">
3835538358
<abbr title="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">ConstraintViolationAdapter.php</abbr>
3835638359
:
38357-
<span title="at line 35">35</span>
38360+
<span title="at line 37">37</span>
3835838361
<img src="./images/copy.svg" title="Copy path" />
3835938362
</div>
3836038363
</div>
@@ -38415,7 +38418,7 @@ <h3 id="method_getTarget">
3841538418
<div class="content-header__found-in copy-to-clipboard" data-copy-value="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">
3841638419
<abbr title="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">ConstraintViolationAdapter.php</abbr>
3841738420
:
38418-
<span title="at line 54">54</span>
38421+
<span title="at line 56">56</span>
3841938422
<img src="./images/copy.svg" title="Copy path" />
3842038423
</div>
3842138424
</div>
@@ -38452,7 +38455,7 @@ <h3 id="method_getTranslatableMessage">
3845238455
<div class="content-header__found-in copy-to-clipboard" data-copy-value="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">
3845338456
<abbr title="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">ConstraintViolationAdapter.php</abbr>
3845438457
:
38455-
<span title="at line 41">41</span>
38458+
<span title="at line 43">43</span>
3845638459
<img src="./images/copy.svg" title="Copy path" />
3845738460
</div>
3845838461
</div>
@@ -38489,7 +38492,7 @@ <h3 id="method_setTarget">
3848938492
<div class="content-header__found-in copy-to-clipboard" data-copy-value="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">
3849038493
<abbr title="vendor/ibexa/core/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php">ConstraintViolationAdapter.php</abbr>
3849138494
:
38492-
<span title="at line 49">49</span>
38495+
<span title="at line 51">51</span>
3849338496
<img src="./images/copy.svg" title="Copy path" />
3849438497
</div>
3849538498
</div>

0 commit comments

Comments
 (0)