<commit_before><?php
/**
 * This file is part of the Clastic package.
 *
 * (c) <NAME> <<EMAIL>>
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Clastic\BlogBundle\Form\Module;

use Clastic\NodeBundle\Form\Extension\AbstractNodeTypeExtension;
use Symfony\Component\Form\FormBuilderInterface;

/**
 * NodeTypeExtension
 *
 * @author <NAME> <<EMAIL>>
 */
class BlogFormExtension extends AbstractNodeTypeExtension
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $this->findTab($builder, 'general')
            ->add('introduction', 'wysiwyg')
            ->add('body', 'wysiwyg');

        $builder->get('tabs')
            ->add(
                $this->createTab($builder, 'category', array('label' => 'Category'))
                    ->add('categories', 'entity_multi_select', array(
                        'class' => 'ClasticBlogBundle:Category',
                        'property' => 'node.title',
                        'required' => false,
                    ))
            );
    }
}<commit_msg>[Blog] Implement TabHelper.<commit_after><?php
/**
 * This file is part of the Clastic package.
 *
 * (c) <NAME> <<EMAIL>>
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Clastic\BlogBundle\Form\Module;

use Clastic\NodeBundle\Form\Extension\AbstractNodeTypeExtension;
use Symfony\Component\Form\FormBuilderInterface;

/**
 * NodeTypeExtension
 *
 * @author <NAME> <<EMAIL>>
 */
class BlogFormExtension extends AbstractNodeTypeExtension
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $this->getTabHelper($builder)->findTab('general')
            ->add('introduction', 'wysiwyg')
            ->add('body', 'wysiwyg');

        $this->getTabHelper($builder)
            ->createTab('category', 'Category')
            ->add('categories', 'entity_multi_select', array(
                'class' => 'ClasticBlogBundle:Category',
                'property' => 'node.title',
                'required' => false,
            ));
    }
}
{'fraction_non_alphanumeric': 0.13935144609991235, 'fraction_numerical': 0.0, 'mean_word_length': 2.5671875, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2469693', 'n_tokens_mistral': 631, 'n_tokens_neox': 613, 'n_words': 144}