本文整理匯總了PHP中FluidTYPO3\Flux\Core::getPipes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Core::getPipes方法的具體用法?PHP Core::getPipes怎麽用?PHP Core::getPipes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FluidTYPO3\Flux\Core
的用法示例。
在下文中一共展示了Core::getPipes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createPipeSheet
/**
* @param string $name
* @return void
*/
protected function createPipeSheet($name)
{
$sheet = $this->createContainer('Sheet', $name)->createContainer('Section', $name);
$namespace = 'FluidTYPO3\\Flux\\Outlet\\Pipe\\';
$pipes = FluxCore::getPipes();
foreach ($pipes as $pipeTypeOrClassName) {
$className = TRUE === class_exists($pipeTypeOrClassName) ? $pipeTypeOrClassName : $namespace . ucfirst($pipeTypeOrClassName) . 'Pipe';
if ('FluidTYPO3\\Flux\\Outlet\\Pipe\\StandardPipe' === $className) {
continue;
}
$instance = $this->objectManager->get($className);
$label = $instance->getLabel();
/** @var PipeObject $pipe */
$pipe = $sheet->createContainer('FluidTYPO3\\Fromage\\Backend\\FormComponent\\PipeObject', $pipeTypeOrClassName);
$pipe->setLabel($label)->addAll($instance->getFormFields());
}
}
示例2: canAddAndRetrievePipes
/**
* @test
*/
public function canAddAndRetrievePipes()
{
$fakeClass = 'MyFakeClass';
Core::registerPipe($fakeClass);
$this->assertContains($fakeClass, Core::getPipes());
Core::unregisterPipe($fakeClass);
$this->assertNotContains($fakeClass, Core::getPipes());
}