src/Loaders/Block.php 1 location
|
@@ 65-69 (lines=5) @@
|
62 |
|
|
63 |
|
$compulsoryFields = ['id', 'lang']; |
64 |
|
|
65 |
|
foreach ($compulsoryFields as $field) { |
66 |
|
if (!isset($yaml[$field])) { |
67 |
|
throw new UnableToLoadFileException('Missing field '.$field.' in YAML front matter of file '.$file); |
68 |
|
} |
69 |
|
} |
70 |
|
|
71 |
|
return new self( |
72 |
|
$yaml['id'], |
src/Loaders/SubTheme.php 1 location
|
@@ 46-50 (lines=5) @@
|
43 |
|
|
44 |
|
$compulsoryFields = ['name', 'parent', 'assignations']; |
45 |
|
|
46 |
|
foreach ($compulsoryFields as $field) { |
47 |
|
if (!isset($yaml[$field])) { |
48 |
|
throw new UnableToLoadFileException('Missing field "'.$field.'" in YAML file '.$file); |
49 |
|
} |
50 |
|
} |
51 |
|
|
52 |
|
return new self( |
53 |
|
$yaml['name'], |
src/Loaders/Theme.php 1 location
|
@@ 41-45 (lines=5) @@
|
38 |
|
|
39 |
|
$compulsoryFields = ['zones']; |
40 |
|
|
41 |
|
foreach ($compulsoryFields as $field) { |
42 |
|
if (!isset($yaml[$field])) { |
43 |
|
throw new UnableToLoadFileException('Missing field '.$field.' in YAML file '.$configPath); |
44 |
|
} |
45 |
|
} |
46 |
|
|
47 |
|
return new self( |
48 |
|
$path, |