This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Tschallacka
Tschallacka

I made this little function to "dump" all available methods + their respective documentation to you. You can implement this in a partial, or where you want to use it, just to see which methods you have access to :-)

function getDocumentation($inspectclass) {
    $methods = get_class_methods($inspectclass);
    $class =get_class($inspectclass);
    $arr = [];
    foreach($methods as $method) {
        $ref=new ReflectionMethod( $class, $method);
        /** No use getting private methods */
        if($ref->isPublic()) {
            $arr[$method] = $ref->getDocComment();
        }
    }
    return dump($arr);
    }
    echo getDocumentation($this);

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.