1 | <?php |
||
7 | use SilverStripe\Forms\CheckboxField; |
||
8 | use SilverStripe\Forms\NumericField; |
||
9 | use SilverStripe\Forms\HTMLEditor\HtmlEditorField; |
||
10 | |||
11 | /** |
||
12 | * Iframe page type embeds an iframe of URL of choice into the page. |
||
13 | * CMS editor can choose width, height, or set it to attempt automatic size configuration. |
||
14 | */ |
||
15 | |||
16 | class IFramePage extends Page |
||
17 | { |
||
18 | private static $db = array( |
||
19 | 'IFrameURL' => 'Text', |
||
20 | 'AutoHeight' => 'Boolean(1)', |
||
21 | 'AutoWidth' => 'Boolean(1)', |
||
22 | 'FixedHeight' => 'Int(500)', |
||
23 | 'FixedWidth' => 'Int(0)', |
||
24 | 'AlternateContent' => 'HTMLText', |
||
25 | 'BottomContent' => 'HTMLText', |
||
26 | 'ForceProtocol' => 'Varchar', |
||
27 | ); |
||
28 | |||
29 | private static $defaults = array( |
||
30 | 'AutoHeight' => '1', |
||
31 | 'AutoWidth' => '1', |
||
32 | 'FixedHeight' => '500', |
||
33 | 'FixedWidth' => '0' |
||
34 | ); |
||
35 | |||
36 | private static $description = 'Embeds an iframe into the body of the page.'; |
||
37 | |||
38 | public function getCMSFields() |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * Compute class from the size parameters. |
||
83 | */ |
||
84 | public function getClass() |
||
85 | { |
||
86 | $class = ''; |
||
87 | if ($this->AutoHeight) { |
||
88 | $class .= 'iframepage-height-auto'; |
||
89 | } |
||
90 | |||
91 | return $class; |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * Compute style from the size parameters. |
||
96 | */ |
||
97 | public function getStyle() |
||
115 | } |
||
116 | |||
117 | /** |
||
118 | * Ensure that the IFrameURL is a valid url and prevents XSS |
||
119 | * |
||
120 | * @throws ValidationException |
||
121 | * @return ValidationResult |
||
122 | */ |
||
123 | public function validate() |
||
138 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths