_subject->setError('JERROR_NOT_A_FORM'); return false; } if( $form->getName() != 'com_menus.item' ) { return true; } $path = JPATH_PLUGINS.DS.'system'.DS.'languageroot'.DS.'form'; JForm::addFormPath( $path ); $form->loadFile( 'form', false ); return true; } public function onContentPrepareData( $context, $data ) { JForm::addFormPath( $this->getFormPath() ); $data->languageroot = array( 'test' => 'test' ); return true; } private function getFormPath() { return JPATH_PLUGINS.DS.'system'.DS.'languageroot'.DS.'form'; } } ?>