Frontend\Modules\Profiles\Engine\Profile::toArray PHP Method

toArray() public method

Convert the object into an array for usage in the template
public toArray ( ) : array
return array
    public function toArray()
    {
        // basis info
        $return['display_name'] = $this->getDisplayName();
        $return['registered_on'] = $this->getRegisteredOn();
        // add settings
        foreach ($this->settings as $key => $value) {
            $return['settings'][$key] = $value;
        }
        // urls
        $return['url']['dashboard'] = FrontendNavigation::getURLForBlock('Profiles');
        $return['url']['settings'] = FrontendNavigation::getURLForBlock('Profiles', 'Settings');
        $return['url']['url'] = $this->getUrl();
        return $return;
    }