CustomerStreamEntity example


    public function create(array $data$index = false)
    {
        $this->checkPrivilege('save');

        $data = $this->prepareData($data);

        $stream = new CustomerStreamEntity();
        $stream->fromArray($data);

        $violations = $this->getManager()->validate($stream);
        if ($violations->count() > 0) {
            throw new ValidationException($violations);
        }

        $this->validateStream($stream);

        $this->getManager()->persist($stream);
        $this->getManager()->flush($stream);

        
Home | Imprint | This part of the site doesn't use cookies.