protected static function create($record) {
        global $DB;
        if (empty($record->tagcollid)) {
            $record->tagcollid = core_tag_collection::get_default();
        }
        $DB->insert_record('tag_area', array('component' => $record->component,
            'itemtype' => $record->itemtype,
            'tagcollid' => $record->tagcollid,
            'callback' => $record->callback,
            'callbackfile' => $record->callbackfile,
            'showstandard' => isset($record->showstandard) ? $record->showstandard : core_tag_tag::BOTH_STANDARD_AND_NOT,
            'multiplecontexts' => isset($record->multiplecontexts) ? $record->multiplecontexts : 0));

        // Reset cache.
        cache::make('core', 'tags')->delete('tag_area');
    }
protected static function create($record) {
        global $DB;
        if (empty($record->tagcollid)) {
            $record->tagcollid = core_tag_collection::get_default();
        }
        $DB->insert_record('tag_area', array('component' => $record->component,
            'itemtype' => $record->itemtype,
            'tagcollid' => $record->tagcollid,
            'callback' => $record->callback,
            'callbackfile' => $record->callbackfile,
            'showstandard' => isset($record->showstandard) ? $record->showstandard : core_tag_tag::BOTH_STANDARD_AND_NOT,
            'multiplecontexts' => isset($record->multiplecontexts) ? $record->multiplecontexts : 0));

        // Reset cache.
        cache::make('core', 'tags')->delete('tag_area');
    }
protected static function create ( $ record ) { global $ DB ; if ( empty ( $ record -> tagcollid ) ) { $ record -> tagcollid = core_tag_collection :: get_default ( ) ; } $ DB -> insert_record ( 'tag_area' , array ( 'component' => $ record -> component , 'itemtype' => $ record -> itemtype , 'tagcollid' => $ record -> tagcollid , 'callback' => $ record -> callback , 'callbackfile' => $ record -> callbackfile , 'showstandard' => isset ( $ record -> showstandard ) ? $ record -> showstandard : core_tag_tag :: BOTH_STANDARD_AND_NOT , 'multiplecontexts' => isset ( $ record -> multiplecontexts ) ? $ record -> multiplecontexts : 0 ) ) ; // Reset cache. cache :: make ( 'core' , 'tags' ) -> delete ( 'tag_area' ) ; }
Create a new tag area

@param stdClass $record
Create a new tag area