for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\Streams\Platform\Ui\Form\Component\Section;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
/**
* Class SectionNormalizer
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
* @package Anomaly\Streams\Platform\Ui\Form\Component\Section
*/
class SectionNormalizer
{
* Normalize the sections.
* @param FormBuilder $builder
public function normalize(FormBuilder $builder)
$sections = $builder->getSections();
foreach ($sections as $slug => &$section) {
if (is_string($section)) {
$section = [
'view' => $section
];
}
$builder->setSections($sections);