isInclude example

$onlySourceFiles,
                function DStorefrontPluginConfiguration $configuration, bool $onlySourceFiles) {
                    $fileCollection = new FileCollection();
                    $scriptFiles = $configuration->getScriptFiles();
                    $addSourceFile = $configuration->getStorefrontEntryFilepath() && $onlySourceFiles;

                    // add source file at the beginning if no other theme is included first                     if (
                        $addSourceFile
                        && (
                            $scriptFiles->count() === 0
                            || !$this->isInclude($scriptFiles->first()->getFilepath())
                        )
                        && $configuration->getStorefrontEntryFilepath()
                    ) {
                        $fileCollection->add(new File($configuration->getStorefrontEntryFilepath()));
                    }
                    foreach ($scriptFiles as $scriptFile) {
                        if (!$this->isInclude($scriptFile->getFilepath()) && $onlySourceFiles) {
                            continue;
                        }
                        $fileCollection->add($scriptFile);
                    }
                    
Home | Imprint | This part of the site doesn't use cookies.