FOF30\Platform\Joomla\Platform::getComponentBaseDirs PHP Method

getComponentBaseDirs() public method

Returns the base (root) directories for a given component.
See also: PlatformInterface::getComponentBaseDirs()
public getComponentBaseDirs ( string $component ) : array
$component string The name of the component. For Joomla! this is something like "com_example"
return array A hash array with keys main, alt, site and admin.
    public function getComponentBaseDirs($component)
    {
        if (!$this->isBackend()) {
            $mainPath = JPATH_SITE . '/components/' . $component;
            $altPath = JPATH_ADMINISTRATOR . '/components/' . $component;
        } else {
            $mainPath = JPATH_ADMINISTRATOR . '/components/' . $component;
            $altPath = JPATH_SITE . '/components/' . $component;
        }
        return array('main' => $mainPath, 'alt' => $altPath, 'site' => JPATH_SITE . '/components/' . $component, 'admin' => JPATH_ADMINISTRATOR . '/components/' . $component);
    }