1. Go to this page and download the library: Download kiboko/akeneo-enrich-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kiboko / akeneo-enrich-bundle example snippets
namespace MyProject\Bundle\PictogramBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Kiboko\Bundle\EnrichBundle\Model\DescribedInterface;
use Kiboko\Bundle\EnrichBundle\Model\DescribedTrait;
use Kiboko\Bundle\EnrichBundle\Model\LabeledInterface;
use Kiboko\Bundle\EnrichBundle\Model\PicturedInterface;
use Kiboko\Bundle\EnrichBundle\Model\PicturedTrait;
use Kiboko\Bundle\EnrichBundle\Model\LabeledTrait;
use Kiboko\Bundle\EnrichBundle\Model\TranslatableCustomEntityTrait;
use Akeneo\Component\Localization\Model\TranslatableInterface;
use Pim\Component\ReferenceData\Model\ReferenceDataInterface;
class Pictogram implements
TranslatableInterface,
ReferenceDataInterface,
DescribedInterface,
LabeledInterface,
PicturedInterface
{
use TranslatableCustomEntityTrait;
use DescribedTrait;
use LabeledTrait;
use PicturedTrait;
/**
* Pictogram constructor.
*/
public function __construct()
{
$this->translations = new ArrayCollection();
}
/**
* Returns the custom entity name used in the configuration
* Used to map row actions on datagrid
*
* @return string
*/
public function getCustomEntityName()
{
return 'pictogram';
}
/**
* Get translation full qualified class name
*
* @return string
*/
public function getTranslationFQCN()
{
return PictogramTranslation::class;
}
/**
* @return string
*/
public static function getLabelProperty()
{
return 'label';
}
/**
* @return string
*/
public static function getFallbackLabelProperty()
{
return 'labelFallback';
}
}
namespace MyProject\Bundle\PictogramBundle\Entity;
use Akeneo\Component\Localization\Model\AbstractTranslation;
use Kiboko\Bundle\EnrichBundle\Model\DescribedTranslationTrait;
use Kiboko\Bundle\EnrichBundle\Model\LabeledTranslationTrait;
use Kiboko\Bundle\EnrichBundle\Model\PicturedTranslationTrait;
class PictogramTranslation extends AbstractTranslation implements
LabeledTranslationInterface,
DescribedTranslationInterface,
PicturedTranslationInterface
{
use DescribedTranslationTrait;
use LabeledTranslationTrait;
use PicturedTranslationTrait;
}