Esempio n. 1
0
	function onDisplayFilter(&$filter, $value='', $formName='adminForm')
	{
		// execute the code only if the field type match the plugin type
		if ( !in_array($filter->field_type, self::$field_types) ) return;
		
		// Prepare field as IF it is a select field
		plgFlexicontent_fieldsTextselect::_prepareField_as_SelectField($filter);
		
		// Create a select field object
		$dispatcher = JDispatcher::getInstance();
		$sel_fld_obj = new plgFlexicontent_fieldsSelect($dispatcher, array());
		
		// Get the FILTER's display ... by changing field type to 'select'
		$filter->field_type = 'select';
		$sel_fld_obj->onDisplayFilter($filter, $value, $formName);
		$filter->field_type = 'textselect';
	}	
 function onDisplayFilter(&$filter, $value = '', $formName = 'adminForm')
 {
     if (!in_array($filter->field_type, self::$field_types)) {
         return;
     }
     // Prepare field as IF it is a using custom Query or custom elements
     plgFlexicontent_fieldsTextselect::_prepareField_as_SelectField($filter);
     $asSelect = $filter->parameters->get('filter_customize_options') != 0;
     // Create a 'select' or 'text' field object and render its filter display
     $dispatcher = JDispatcher::getInstance();
     $filter->field_type = $asSelect ? 'select' : 'text';
     $_fld_obj = $asSelect ? new plgFlexicontent_fieldsSelect($dispatcher, array()) : new plgFlexicontent_fieldsText($dispatcher, array());
     $_fld_obj->onDisplayFilter($filter, $value, $formName);
     $filter->field_type = 'textselect';
 }