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

namespace WellCommerce\Bundle\AppBundle\Entity;

use Knp\DoctrineBehaviors\Model\Blameable\Blameable;
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable;
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface;
use WellCommerce\Component\Layout\Model\LayoutBoxInterface;

/**
 * Class LayoutBox
 *
 * @author  <NAME> <<EMAIL>>
 */
class LayoutBox implements EntityInterface, LayoutBoxInterface
{
    use Identifiable;
    use Timestampable;
    use Translatable;
    use Blameable;
    
    protected $boxType    = '';
    protected $identifier = '';
    protected $settings   = [];
    
    public function getBoxType(): string
    {
        return $this->boxType;
    }
    
    public function setBoxType(string $boxType)
    {
        $this->boxType = $boxType;
    }
    
    public function getSettings(): array
    {
        return $this->settings;
    }
    
    public function setSettings(array $settings)
    {
        $this->settings = $settings;
    }
    
    public function getIdentifier(): string
    {
        return $this->identifier;
    }
    
    public function setIdentifier(string $identifier)
    {
        $this->identifier = $identifier;
    }
    
    public function getName(): string
    {
        return $this->translate()->getName();
    }
    
    public function getContent(): string
    {
        return $this->translate()->getContent();
    }
    
    public function translate($locale = null, $fallbackToDefault = true): LayoutBoxTranslation
    {
        return $this->doTranslate($locale, $fallbackToDefault);
    }
    
}
<commit_msg>New layout box configurator handling. Renderer moved to layout component.<commit_after><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */

namespace WellCommerce\Bundle\AppBundle\Entity;

use Knp\DoctrineBehaviors\Model\Blameable\Blameable;
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable;
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface;
use WellCommerce\Component\Layout\Model\LayoutBoxInterface;

/**
 * Class LayoutBox
 *
 * @author  <NAME> <<EMAIL>>
 */
class LayoutBox implements EntityInterface, LayoutBoxInterface
{
    use Identifiable;
    use Timestampable;
    use Translatable;
    use Blameable;
    
    protected $boxType    = '';
    protected $identifier = '';
    protected $settings   = [];
    
    public function getBoxType(): string
    {
        return $this->boxType;
    }
    
    public function setBoxType(string $boxType)
    {
        $this->boxType = $boxType;
    }
    
    public function getSettings(): array
    {
        return $this->settings;
    }
    
    public function setSettings(array $settings)
    {
        $this->settings = $settings;
    }
    
    public function getIdentifier(): string
    {
        return $this->identifier;
    }
    
    public function setIdentifier(string $identifier)
    {
        $this->identifier = $identifier;
    }
    
    public function getBoxName(): string
    {
        return $this->translate()->getName();
    }
    
    public function getBoxContent(): string
    {
        return $this->translate()->getContent();
    }
    
    public function translate($locale = null, $fallbackToDefault = true): LayoutBoxTranslation
    {
        return $this->doTranslate($locale, $fallbackToDefault);
    }
    
}

{'fraction_non_alphanumeric': 0.10422812192723697, 'fraction_numerical': 0.0, 'mean_word_length': 2.950485436893204, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 37, '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': '2806711', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1161, 'n_words': 271}