Ben de özel filtre kullanmak ve bu filtrenin içine geçerli modülünü alabilirsiniz:
customFilter:
class: customFilter
param:
module_excluded: moduleName
Ve içeride: Aksi
<?php
class customFilter extends sfFilter
{
public function execute ($filterChain)
{
$context = $this->getContext();
if ('moduleName' == $context->getModuleName())
{
// jump to the next filter
return $filterChain->execute();
}
// other stuff
}
}
, ayrıca filters.yml
dosyasının içinde dışlanan modülünü verebilir Sınıfı:
<?php
class customFilter extends sfFilter
{
public function execute ($filterChain)
{
$context = $this->getContext();
if ($this->getParameter('module_excluded') == $context->getModuleName())
{
// jump to the next filter
return $filterChain->execute();
}
// other stuff
}
}
Harika, bu benim için çalışıyor, ancak bu işbirliği için küçük değişiklikler var. de work ---> içindeki filters.yml ---> bu "param:" değil "params:" –
Haklısın, düzeltdim. – j0k