/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $html = array(); $thisid = $this->id; $values = $this->value; $class = $this->class; $languages = JLanguageHelper::getLanguages(); foreach ($languages as $lang) { $language = new JLanguage($lang->lang_code); $this->class = $class . ($language->isRTL() ? ' rtl' : ' ltr'); $this->element['label'] = $lang->title; $this->name = 'jform[' . $this->fieldname . '][' . $lang->lang_code . ']'; $this->id = $thisid . '_' . $lang->lang_code; $this->value = array_key_exists($lang->lang_code, $values) ? $values[$lang->lang_code] : ''; $html[] = '<div class="control-group">'; $html[] = '<div class="control-label">'; $html[] = parent::getLabel(); $html[] = '</div>'; $html[] = '<div class="controls">'; $html[] = parent::getInput(); $html[] = '</div>'; $html[] = '</div>'; } return implode($html); }
/** * Test... * * @covers JLanguage::isRTL * @todo Implement testIsRTL(). * * @return void */ public function testIsRTL() { $this->assertFalse( $this->object->isRTL() ); // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
/** * @todo Implement testIsRTL(). */ public function testIsRTL() { // This method get language RTL $lang = new JLanguage(''); // In this case, returns 0 (default language) // - same operation of get method with RTL property $this->assertEquals('0', $lang->isRTL(), 'Line: ' . __LINE__); $this->assertNotEquals('1', $lang->isRTL(), 'Line: ' . __LINE__); }
/** * Test... * * @return void */ public function testIsRTL() { $this->assertFalse($this->object->isRTL()); }