kematjaya/code-manager-bundle

2.2.1 2021-08-29 09:11 UTC

This package is auto-updated.

Last update: 2024-03-29 04:38:55 UTC


README

  • installation
composer require kematjaya/code-manager-bundle
  • update database schema
php bin/console doctrine:schema:update --force
  • implement in your entity
...
use Kematjaya\CodeManager\Entity\CodeLibraryClientInterface;
...

class Transaction implements CodeLibraryClientInterface
{

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $code;

    public function getClassId():?string
    {
        return $this->getId();
    }
    
    /**
     * additional code
     */
    public function getLibrary():array
    {
        return [
            "foo" => "foo",
            "bar" => 'bar'
        ];
    }
    
    public function getGeneratedCode():?string
    {
        return $this->getCode();
    }
    
    public function setGeneratedCode(string $code): CodeLibraryClientInterface
    {
        return $this->setCode($code);
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(string $code): CreditInterface
    {
        $this->code = $code;

        return $this;
    }
}