TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
GridRow.php
Go to the documentation of this file.
1
<?php
2
declare(strict_types = 1);
3
namespace
TYPO3\CMS\Form\Domain\Model\FormElements
;
4
5
/*
6
* This file is part of the TYPO3 CMS project.
7
*
8
* It is free software; you can redistribute it and/or modify it under
9
* the terms of the GNU General Public License, either version 2
10
* of the License, or any later version.
11
*
12
* For the full copyright and license information, please read the
13
* LICENSE.txt file that was distributed with this source code.
14
*
15
* The TYPO3 project - inspiring people to share!
16
*/
17
18
use
TYPO3\CMS\Form\Domain\Exception\TypeDefinitionNotValidException
;
19
30
class
GridRow
extends
Section
implements
GridRowInterface
31
{
32
39
public
function
addElement
(
FormElementInterface
$formElement)
40
{
41
if
($formElement instanceof
GridContainerInterface
) {
42
throw
new
TypeDefinitionNotValidException
(
43
sprintf(
'Grid containers ("%s") within grid rows ("%s") are not allowed.'
, $formElement->
getIdentifier
(), $this->getIdentifier()),
44
1489413379
45
);
46
}
47
48
$this->
addRenderable
($formElement);
49
}
50
59
public
function
createElement
(
string
$identifier
,
string
$typeName):
FormElementInterface
60
{
61
$element = parent::createElement(
$identifier
, $typeName);
62
63
if
($element instanceof
GridContainerInterface
) {
64
throw
new
TypeDefinitionNotValidException
(
65
sprintf(
'Grid containers ("%s") within grid rows ("%s") are not allowed.'
, $element->getIdentifier(), $this->getIdentifier()),
66
1489413538
67
);
68
}
69
70
return
$element;
71
}
72
}
TYPO3\CMS\Form\Domain\Model\FormElements\Section
Definition:
Section.php:35
TYPO3\CMS\Form\Domain\Model\FormElements\GridRow\addElement
addElement(FormElementInterface $formElement)
Definition:
GridRow.php:39
TYPO3\CMS\Form\Domain\Model\FormElements\GridRow
Definition:
GridRow.php:31
TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface\getIdentifier
string getIdentifier()
TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface
Definition:
FormElementInterface.php:36
TYPO3\CMS\Form\Domain\Model\FormElements\GridContainerInterface
Definition:
GridContainerInterface.php:22
TYPO3\CMS\Form\Domain\Model\FormElements\GridRowInterface
Definition:
GridRowInterface.php:22
TYPO3\CMS\Form\Domain\Exception\TypeDefinitionNotValidException
Definition:
TypeDefinitionNotValidException.php:27
TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\$identifier
string $identifier
Definition:
AbstractRenderable.php:52
TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable\addRenderable
addRenderable(RenderableInterface $renderable)
Definition:
AbstractCompositeRenderable.php:48
TYPO3\CMS\Form\Domain\Model\FormElements\GridRow\createElement
GridRowInterface createElement(string $identifier, string $typeName)
Definition:
GridRow.php:59
TYPO3\CMS\Form\Domain\Model\FormElements
Definition:
AbstractFormElement.php:3
doxygen
typo3
sysext
form
Classes
Domain
Model
FormElements
GridRow.php
Generated on Tue Oct 5 2021 01:57:40 for TYPO3CMS by
1.8.18