Lines Matching refs:this
9 * can extend those menus through action plugins and add their own instances of this class,
33 /** @var string the page id this action links to */
35 /** @var string the method to be used when this action is used in a form */
41 /** @var string this item's label may contain a placeholder, which is replaced with this */
43 /** @var string the full path to the SVG icon of this menu item */
49 /** @var int the context this titme is shown in */
63 $this->id = $ID;
64 $this->type = $this->getType();
65 $this->params['do'] = $this->type;
67 if(!actionOK($this->type)) throw new \RuntimeException("action disabled: {$this->type}");
71 * Return this item's label
80 if($this->label !== '') return $this->label;
84 $label = $lang['btn_' . $this->type];
86 $label = sprintf($label, $this->replacement);
88 if($label === '') $label = '[' . $this->type . ']';
93 * Return this item's title
101 if($this->title === '') return $this->getLabel();
102 return $this->title;
106 * Return the link this item links to
117 if($this->id && $this->id[0] == '#') {
118 return $this->id;
120 return wl($this->id, $this->params, false, '&');
128 * @param string|false $classprefix create a class from type with this prefix, false for no class
133 'href' => $this->getLink(),
134 'title' => $this->getTitle(),
136 if($this->isNofollow()) $attr['rel'] = 'nofollow';
137 if($this->getAccesskey()) {
138 $attr['accesskey'] = $this->getAccesskey();
139 $attr['title'] .= ' [' . $this->getAccesskey() . ']';
141 if($classprefix !== false) $attr['class'] = $classprefix . $this->getType();
151 * @param string|false $classprefix create a class from type with this prefix, false for no class
156 $attr = buildAttributes($this->getLinkAttributes($classprefix));
159 $html .= '<span>' . hsc($this->getLabel()) . '</span>';
160 $html .= inlineSVG($this->getSvg());
162 $html .= hsc($this->getLabel());
178 $this->getType(),
179 $this->id,
180 $this->getAccesskey(),
181 $this->getParams(),
182 $this->method,
183 $this->getTitle(),
184 $this->getLabel(),
185 $this->getSvg()
190 * Should this item be shown in the given context
196 return (bool) ($ctx & $this->context);
200 * @return string the name of this item
203 if($this->type === '') {
204 $this->type = strtolower(substr(strrchr(get_class($this), '\\'), 1));
206 return $this->type;
213 return $this->accesskey;
220 return $this->params;
227 return $this->nofollow;
234 return $this->svg;
238 * Return this Item's settings as an array as used in tpl_get_action()
244 'accesskey' => $this->accesskey ?: null,
245 'type' => $this->type,
246 'id' => $this->id,
247 'method' => $this->method,
248 'params' => $this->params,
249 'nofollow' => $this->nofollow,
250 'replacement' => $this->replacement