Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Iframe | |
0.00% |
0 / 5 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| value | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| structure | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Field; |
| 6 | |
| 7 | use Cosray\Value\Iframe as IframeValue; |
| 8 | |
| 9 | class Iframe extends Text |
| 10 | { |
| 11 | public function value(): IframeValue |
| 12 | { |
| 13 | return new IframeValue($this->owner, $this, $this->valueContext); |
| 14 | } |
| 15 | |
| 16 | public function structure(mixed $value = null): array |
| 17 | { |
| 18 | $result = $this->getTranslatableStructure('iframe', $value); |
| 19 | $result['meta']['iframeWidth'] = [self::NEUTRAL_LOCALE => '100%']; |
| 20 | $result['meta']['iframeHeight'] = [self::NEUTRAL_LOCALE => '75%']; |
| 21 | |
| 22 | return $result; |
| 23 | } |
| 24 | } |