You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building a component library in it's own package. That package is not a neos-site, but a simple neos-package. As such it does not appear in the package selector in Monocle.
Since offering all packages is useless and checking all packages for potentially providing components, I'd suggest a way to register packages for inclusion through Monocle's settings.
The text was updated successfully, but these errors were encountered:
I had a quick look, but this would probably require a bigger change since the PackageKeyTrait is used in quite a few places.
I got it to work for our case with a little AOP aspect (in case someone else needs this):
<?phpdeclare(strict_types=1);
namespaceSome\Package\Aspects;
useNeos\Flow\AnnotationsasFlow;
useNeos\Flow\Aop\JoinPointInterface;
/** * @Flow\Aspect */finalclass MonoclePackageKeyTraitAspect
{
/** * Aspect that prepends the active site package list with "Some.Package" so that this package appears in the * site selector of the Monocle Preview * * * @Flow\Around("method(Sitegeist\Monocle\Controller\ApiController->getActiveSitePackageKeys())") * @param JoinPointInterface $joinPoint * @return array */publicfunctionaddPackageToActiveSitePackageKeys(JoinPointInterface$joinPoint): array
{
$activeSitePackages = $joinPoint->getAdviceChain()->proceed($joinPoint);
array_unshift($activeSitePackages, 'Some.Package');
return$activeSitePackages;
}
}
I am building a component library in it's own package. That package is not a
neos-site
, but a simpleneos-package
. As such it does not appear in the package selector in Monocle.Since offering all packages is useless and checking all packages for potentially providing components, I'd suggest a way to register packages for inclusion through Monocle's settings.
The text was updated successfully, but these errors were encountered: