1 | <?php |
||
24 | class CreatePage extends BaseCreatePage implements CreatePageInterface |
||
25 | { |
||
26 | use SpecifiesItsCode; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function countTaxons() |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function countTaxonsByName($name) |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function chooseParent(TaxonInterface $taxon) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function deleteTaxonOnPageByName($name) |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function describeItAs($description, $languageCode) |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function hasTaxonWithName($name) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function nameIt($name, $languageCode) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function specifyPermalink($permalink, $languageCode) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function attachImage($path, $code = null) |
||
113 | { |
||
114 | $filesPath = $this->getParameter('files_path'); |
||
115 | |||
116 | $this->getDocument()->clickLink('Add'); |
||
117 | |||
118 | $imageForm = $this->getLastImageElement(); |
||
119 | $imageForm->fillField('Code', $code); |
||
120 | $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
||
121 | } |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | protected function getDefinedElements() |
||
138 | |||
139 | /** |
||
140 | * @return NodeElement[] |
||
141 | * |
||
142 | * @throws ElementNotFoundException |
||
143 | */ |
||
144 | private function getLeafs() |
||
151 | |||
152 | /** |
||
153 | * @return NodeElement |
||
154 | */ |
||
155 | private function getLastImageElement() |
||
164 | } |
||
165 |