BaseEventTypeController::getElementModulePathAlias PHP Method

getElementModulePathAlias() public method

Return the path alias for the module the element belongs to based on its namespace (assumes elements exist in a namespace below the module namespace).
public getElementModulePathAlias ( BaseEventTypeElement $element ) : string
$element BaseEventTypeElement
return string
    public function getElementModulePathAlias(\BaseEventTypeElement $element)
    {
        $r = new ReflectionClass($element);
        if ($r->inNamespace()) {
            $ns_parts = explode('\\', $r->getNamespaceName());
            return implode('.', array_slice($ns_parts, 0, count($ns_parts) - 1));
        }
        return $this->modulePathAlias;
    }
BaseEventTypeController