Lines Matching defs:data
18 * preprocess edit form data
74 // prepare data for EDIT_FORM_ALTERNATE event
75 $data = [
83 if ($data['target'] !== 'section') {
84 // Only emit event if page is writable, section edit data is valid and
86 Event::createAndTrigger('EDIT_FORM_ADDTEXTAREA', $data, [$this, 'addTextarea'], true);
88 $this->addTextarea($data);
91 $form->setHiddenField('target', $data['target']);
157 if (isset($data['intro_locale'])) {
158 echo p_locale_xhtml($data['intro_locale']);
165 if ($wr && $data['media_manager']) {
190 * @param array{wr: bool, media_manager: bool, target: string, intro_locale: string, form: Form} $data
192 public function addTextarea(&$data)
196 if ($data['target'] !== 'section') {
197 msg('No editor for edit target ' . hsc($data['target']) . ' found.', -1);
202 if (!$data['wr']) $attr['readonly'] = 'readonly';
207 $data['form']->addTextarea('wikitext', '')->attrs($attr)->val($TEXT)