public static function update_processor_status($processor, $enabled) {
        global $DB;
        $cache = \cache::make('core', 'message_processors_enabled');
        $cache->delete($processor->name);
        return $DB->set_field('message_processors', 'enabled', $enabled, array('id' => $processor->id));
    }
public static function update_processor_status($processor, $enabled) {
        global $DB;
        $cache = \cache::make('core', 'message_processors_enabled');
        $cache->delete($processor->name);
        return $DB->set_field('message_processors', 'enabled', $enabled, array('id' => $processor->id));
    }
public static function update_processor_status ( $ processor , $ enabled ) { global $ DB ; $ cache = \ cache :: make ( 'core' , 'message_processors_enabled' ) ; $ cache -> delete ( $ processor -> name ) ; return $ DB -> set_field ( 'message_processors' , 'enabled' , $ enabled , array ( 'id' => $ processor -> id ) ) ; }
Set status of a processor.

@param \stdClass $processor processor record.
@param 0|1 $enabled 0 or 1 to set the processor status.
@return bool
@since Moodle 3.2
Set status of a processor .