public static function create_issuer($data) {
        require_capability('moodle/site:config', context_system::instance());
        $issuer = new issuer(0, $data);

        // Will throw exceptions on validation failures.
        $issuer->create();

        // Perform service discovery.
        self::discover_endpoints($issuer);
        self::guess_image($issuer);
        return $issuer;
    }
public static function create_issuer($data) {
        require_capability('moodle/site:config', context_system::instance());
        $issuer = new issuer(0, $data);

        // Will throw exceptions on validation failures.
        $issuer->create();

        // Perform service discovery.
        self::discover_endpoints($issuer);
        self::guess_image($issuer);
        return $issuer;
    }
public static function create_issuer ( $ data ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; $ issuer = new issuer ( 0 , $ data ) ; // Will throw exceptions on validation failures. $ issuer -> create ( ) ; // Perform service discovery. self :: discover_endpoints ( $ issuer ) ; self :: guess_image ( $ issuer ) ; return $ issuer ; }
Take the data from the mform and create the issuer.

@param stdClass $data
@return \core\oauth2\issuer
Take the data from the mform and create the issuer .