protected function setExternals()
    {
        // Check externals
        if (empty($this->externals)) {
            return;
        }

        $externals = [];
        $internals = $this->internals;

        // Iterate
        foreach ($this->externals as $alias => $component) {
            $class = new \ReflectionClass($component);
            $path = dirname(dirname($class->getFileName())).S.'Resources'.S;

            $externals[strtolower($alias)] = $path;
        }

        // Register all vendor views
        add_filter('ol_zeus_render_views', function ($paths) use ($externals) {
            foreach ($externals as $alias => $path) {
                $paths[$alias] = $path.'views';
            }

            return $paths;
        });

        // Register all internal assets
        add_filter('ol_zeus_render_assets', function ($paths) use ($internals) {
            foreach ($internals as $name => $path) {
                $paths[$name] = OL_ZEUS_PATH.S.$path;
            }

            return $paths;
        });

        // Register all vendor translations
        add_filter('ol_zeus_translate_resources', function ($yamls) use ($externals) {
            foreach ($externals as $alias => $path) {
                $yamls[$path.'languages'] = $alias.'field';
            }

            return $yamls;
        });
    }
protected function setExternals()
    {
        // Check externals
        if (empty($this->externals)) {
            return;
        }

        $externals = [];
        $internals = $this->internals;

        // Iterate
        foreach ($this->externals as $alias => $component) {
            $class = new \ReflectionClass($component);
            $path = dirname(dirname($class->getFileName())).S.'Resources'.S;

            $externals[strtolower($alias)] = $path;
        }

        // Register all vendor views
        add_filter('ol_zeus_render_views', function ($paths) use ($externals) {
            foreach ($externals as $alias => $path) {
                $paths[$alias] = $path.'views';
            }

            return $paths;
        });

        // Register all internal assets
        add_filter('ol_zeus_render_assets', function ($paths) use ($internals) {
            foreach ($internals as $name => $path) {
                $paths[$name] = OL_ZEUS_PATH.S.$path;
            }

            return $paths;
        });

        // Register all vendor translations
        add_filter('ol_zeus_translate_resources', function ($yamls) use ($externals) {
            foreach ($externals as $alias => $path) {
                $yamls[$path.'languages'] = $alias.'field';
            }

            return $yamls;
        });
    }
protected function setExternals ( ) { // Check externals if ( empty ( $ this -> externals ) ) { return ; } $ externals = [ ] ; $ internals = $ this -> internals ; // Iterate foreach ( $ this -> externals as $ alias => $ component ) { $ class = new \ ReflectionClass ( $ component ) ; $ path = dirname ( dirname ( $ class -> getFileName ( ) ) ) . S . 'Resources' . S ; $ externals [ strtolower ( $ alias ) ] = $ path ; } // Register all vendor views add_filter ( 'ol_zeus_render_views' , function ( $ paths ) use ( $ externals ) { foreach ( $ externals as $ alias => $ path ) { $ paths [ $ alias ] = $ path . 'views' ; } return $ paths ; } ) ; // Register all internal assets add_filter ( 'ol_zeus_render_assets' , function ( $ paths ) use ( $ internals ) { foreach ( $ internals as $ name => $ path ) { $ paths [ $ name ] = OL_ZEUS_PATH . S . $ path ; } return $ paths ; } ) ; // Register all vendor translations add_filter ( 'ol_zeus_translate_resources' , function ( $ yamls ) use ( $ externals ) { foreach ( $ externals as $ alias => $ path ) { $ yamls [ $ path . 'languages' ] = $ alias . 'field' ; } return $ yamls ; } ) ; }
Prepare externals.
Prepare externals .