administrator/components/com_categories/models/category.php
public function publish(&$pks, $value = 1)
	{
		if (parent::publish($pks, $value))
		{
			$dispatcher = JEventDispatcher::getInstance();
			$extension = JFactory::getApplication()->input->get('extension');

			// Include the content plugins for the change of category state event.
			JPluginHelper::importPlugin('content');

			// Trigger the onCategoryChangeState event.
			$dispatcher->trigger('onCategoryChangeState', array($extension, $pks, $value));

			return true;
		}
	}
public function publish(&$pks, $value = 1)
	{
		if (parent::publish($pks, $value))
		{
			$dispatcher = JEventDispatcher::getInstance();
			$extension = JFactory::getApplication()->input->get('extension');

			// Include the content plugins for the change of category state event.
			JPluginHelper::importPlugin('content');

			// Trigger the onCategoryChangeState event.
			$dispatcher->trigger('onCategoryChangeState', array($extension, $pks, $value));

			return true;
		}
	}
public function publish ( & $ pks , $ value = 1 ) { if ( parent :: publish ( $ pks , $ value ) ) { $ dispatcher = JEventDispatcher :: getInstance ( ) ; $ extension = JFactory :: getApplication ( ) -> input -> get ( 'extension' ) ; // Include the content plugins for the change of category state event. JPluginHelper :: importPlugin ( 'content' ) ; // Trigger the onCategoryChangeState event. $ dispatcher -> trigger ( 'onCategoryChangeState' , array ( $ extension , $ pks , $ value ) ) ; return true ; } }
Method to change the published state of one or more records.

@param   array    &$pks   A list of the primary keys to change.
@param   integer  $value  The value of the published state.

@return  boolean  True on success.

@since   2.5
Method to change the published state of one or more records .