Lines Matching +full:add +full:- +full:matcher

43         // of use of $this->getLang
44 $this->setupLocale();
56 if (!isset($this->pageRuleManager)) {
58 $this->pageRuleManager = new PageRules();
87 return ucfirst(PluginUtility::$PLUGIN_NAME) . " - " . $this->lang['PageRules'];
92 return DirectoryLayout::getComboImagesDirectory()->resolve('page-next.svg')->toAbsoluteId();
102 $this->initiatePageRuleManager();
105 * If one of the form submit has the add key
110 $matcher = $_POST[PageRules::MATCHER_NAME] ?? null;
114 if ($matcher == null) {
115 msg('Matcher can not be null', LogUtility::LVL_MSG_ERROR);
123 if ($matcher == $target) {
124 … msg($this->lang['SameSourceAndTargetAndPage'] . ': ' . $matcher . '', LogUtility::LVL_MSG_ERROR);
129 if (!$this->pageRuleManager->patternExists($matcher)) {
130 $this->pageRuleManager->addRule($matcher, $target, $priority);
131 msg($this->lang['Saved'], LogUtility::LVL_MSG_INFO);
133 …msg("The matcher pattern ($matcher) already exists. The page rule was not inserted.", LogUtility::…
136 $this->pageRuleManager->updateRule($id, $matcher, $target, $priority);
137 msg($this->lang['Saved'], LogUtility::LVL_MSG_INFO);
146 $this->pageRuleManager->deleteRule($ruleId);
147 msg($this->lang['Deleted'], LogUtility::LVL_MSG_INFO);
155 * TODO: Add variable parsing where the key is the key of the lang object ??
160 $this->initiatePageRuleManager();
162 …echo('<h1>' . ucfirst(PluginUtility::$PLUGIN_NAME) . ' - ' . ucfirst($this->getPluginComponent()) …
163 $relativePath = 'admin/' . $this->getPluginComponent() . '_intro';
164 echo($this->locale_xhtml($relativePath));
169 $matcher = null;
176 $rule = $this->pageRuleManager->getRule($id);
177 $matcher = $rule[PageRules::MATCHER_NAME];
185 echo('<div id="form_container" style="max-width: 600px;">');
190 if ($matcher != null) {
191 $matcherDefault = 'value="' . $matcher . '"';
197 if ($matcher != null) {
208 …echo('<input type="hidden" name="page" value="' . $this->getPluginName() . '_' . $this->getPlugin…
210 …echo('<a class="btn btn-light" href="?do=admin&page=webcomponent_pagerules" > ' . 'Cancel' . ' <a/…
211 …echo('<input class="btn btn-primary" type="submit" name="save" class="button" value="' . 'Save' . …
224 echo('<form class="pt-3 pb-3" action="" method="post">');
227 …echo(' <input type="hidden" name="page" value="' . $this->getPluginName() . '_' . $this->getPlugi…
228 … name="Create a page rule" class="button" value="' . $this->getLangOrDefault('AddNewRule', 'Add a …
232 $rules = $this->pageRuleManager->getRules();
237 echo('<div class="table-responsive">');
239 echo('<table class="table table-hover">');
243 echo(' <th>' . $this->getLangOrDefault('Priority', 'Priority') . '</th>');
244 echo(' <th>' . $this->getLangOrDefault('Matcher', 'Matcher') . '</th>');
245 echo(' <th>' . $this->getLangOrDefault('Target', 'Target') . '</th>');
246 echo(' <th>' . $this->getLangOrDefault('NDate', 'Date') . '</th>');
255 $matcher = $row[PageRules::MATCHER_NAME];
263 echo(' <form action="" method="post" style="display: inline-block">');
266 …echo(inlineSVG(DirectoryLayout::getComboImagesDirectory()->resolve('delete.svg')->toAbsoluteId()));
271 echo(' <form action="" method="post" style="display: inline-block">');
274 …o(inlineSVG(DirectoryLayout::getComboImagesDirectory()->resolve('file-document-edit-outline.svg')-
282 echo(' <td>' . $matcher . '</td>');
308 $lang = $this->getLang($id);