Creates a new Provincia entity.
968377
public function newAction(Request $request)
    {
        $provincium = new Provincia();
        $form = $this->createForm('Matudelatower\UbicacionBundle\Form\Type\ProvinciaType', $provincium);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($provincium);
            $em->flush();

            return $this->redirectToRoute('provincia_show', array('id' => $provincium->getId()));
        }

        return $this->render('UbicacionBundle:provincia:new.html.twig', array(
            'provincium' => $provincium,
            'form' => $form->createView(),
        ));
    }
304095
public function instantiateEntity($params)
    {

        // Modify params so the class builder knows what was included via with()
        $params->_with = $this->with;

        $params->_fields = $this->fields;

        // Instantiate new entity class
        return new $this->class($params);

    }
490198
public static function createFor($entityClass, $collectionPropertyName, DCPackage $dc) {
    $entityMeta = $dc->getEntityMeta($entityClass);
    $property = $entityMeta->getPropertyMeta($collectionPropertyName);
    $collectionClass = $property->getRelationEntityClass();
    
    $synchronizer = new static(
      $entityMeta,
      $property->getName(),
      new UniqueEntityHydrator($dc->getEntityManager()->getRepository($collectionClass->getFQN())),
      new EntityFactory($dc->getEntityMeta($collectionClass->getFQN()))
    );
    
    return $synchronizer;
  }
771522
public function createMetaEntityFactory(): MetaEntityFactory {
		if (!isset($this->metaEntityFactory)) {
			$this->metaEntityFactory = new PgsqlMetaEntityFactory($this);
		}
		
		return $this->metaEntityFactory;
	}
1000365
public function create()
    {
        // Validate form
        $form = $this->getForm('Create' . $this->getEntityName());
        if (!$form->isValid()) {
            return false;
        }

        // Insert new entity
        $now    = new \DateTime();
        $entity = $form->getData();
        $entity->setLastModified($now);
        $entity->setCreated($now);

        // Trigger oncreate
        $this->onCreate($entity);

        // Save
        $this->getEntityManager()->persist($entity);
        return $this->save($this->getEntityName() . ' created.', 'Unable to create ' . strtolower($this->getEntityName()) . '.');
    }
995996
public function create()
    {
        /**
         * @var Tax $tax
         */
        $classNamespace = $this->getEntityNamespace();
        $tax = new $classNamespace();
        $tax
            ->setName('')
            ->setDescription('')
            ->setValue(0)
            ->setEnabled(false);

        return $tax;
    }
1163336
protected final PrcEntityCreate<RS, IHasId<Object>, Object>
    createPutPrcEntityCreate() throws Exception {
    PrcEntityCreate<RS, IHasId<Object>, Object> proc =
      new PrcEntityCreate<RS, IHasId<Object>, Object>();
    proc.setSrvOrm(getSrvOrm());
    proc.setMngUvdSettings(getMngUvdSettings());
    proc.setSrvDate(getSrvDate());
    proc.setConvertersFieldsFatory(getConvertersFieldsFatory());
    proc.setFieldConverterNamesHolder(getFieldConverterNamesHolder());
    //assigning fully initialized object:
    this.processorsMap
      .put(PrcEntityCreate.class.getSimpleName(), proc);
    return proc;
  }
1220839
public function createEntity(string $entity_id, array $parents)
    {
        $entity = new Entity($this, $entity_id, $parents);
        return $entity;
    }
1219601
public function create()
    {
        $sm = $this->em->getConnection()->getSchemaManager();
        $table = $this->em->getClassMetadata(self::$entityName)->getTableName();

        return $sm->tablesExist(array($table));
    }
192057
private function createEntity()
    {
        $entity = new CacheEntity();
        $entity->setAddress1(trim(ucwords($this->contact->getAddress1())));
        $entity->setAddress2(trim(ucwords($this->contact->getAddress2())));
        $category = $this->contactClient->getCategory();
        if ($category) {
            $entity->setCategory($category->getId());
        }
        $entity->setCity(trim(ucwords($this->contact->getCity())));
        $entity->setContact($this->contact->getId());
        $entity->setContactClient($this->contactClient->getId());
        $entity->setState(trim(ucwords($this->contact->getStage())));
        $entity->setCountry(trim(ucwords($this->contact->getCountry())));
        $entity->setZipcode(trim($this->contact->getZipcode()));
        $entity->setEmail(trim($this->contact->getEmail()));
        $phone = $this->phoneValidate($this->contact->getPhone());
        if (!empty($phone)) {
            $entity->setPhone($phone);
        }
        $mobile = $this->phoneValidate($this->contact->getMobile());
        if (!empty($mobile)) {
            $entity->setMobile($mobile);
        }
        $utmSource = $this->getUtmSource();
        if (!empty($utmSource)) {
            $entity->setUtmSource($utmSource);
        }
        if ($this->dateSend) {
            $entity->setDateAdded($this->dateSend);
        }

        return $entity;
    }
619132
private function createDeleteForm(Provincia $provincium)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('provincia_delete', array('id' => $provincium->getId())))
            ->setMethod('DELETE')
            ->getForm()
        ;
    }
1334645
protected function createEntity(DibiRow $dibiRow, $entityClass = null, $table = null)
    {
        if ($table === null) {
            $table = $this->getTable();
        }
        $result = Result::createInstance($dibiRow, $table, $this->connection, $this->mapper);
        $primaryKey = $this->mapper->getPrimaryKey($table);

        $row = $result->getRow($dibiRow->$primaryKey);
        if ($entityClass === null) {
            $entityClass = $this->mapper->getEntityClass($table, $row);
        }
        $entity = $this->entityFactory->createEntity($entityClass, $row);
        $entity->makeAlive($this->entityFactory);
        return $entity;
    }
27868
private function createIfNotExists()
    {
        $table = new Table('schema_migration');
        if ($this->info->isTableExists($table)) {
            return;
        }
        $primaryKey = new PrimaryKey(array('version'));
        $primaryKey->disableAutoIncrement();

        $table->addConstraint($primaryKey);
        $table
            ->addColumn(new BigIntegerColumn('version'))
            ->addColumn(new DateTimeColumn('created_at', array('nullable' => false, 'default' => 'now()')));
        $this->manipulation->create($table);
    }
1029830
public function newAction()
    {
        $this->isAllowed('BUSINESS_MANAGE_ROLE');

        $entity = new RegistrationRole();
        $form   = $this->createCreateForm($entity);
        return $this->render('CanalTPSamEcoreSecurityBundle:Role:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }
557666
def create_entity(self):
        """"""
        self._highest_id_seen += 1
        entity = Entity(self._highest_id_seen, self)
        self._entities.append(entity)
        return entity
726705
public function create()
  {
    $class = ClassGen::classGen(
      $this->name,
      $this->namespace,
      [
        'Phrest\API\Enums\RequestMethodEnum',
        'Phrest\SDK\Request\AbstractRequest',
        'Phrest\SDK\Request\RequestOptions',
        'Phrest\SDK\PhrestSDK'
      ],
      'AbstractRequest'
    );

    // Path
    $path = '/' . $this->version . '/'
      . strtolower($this->entityName)
      . $this->getPlaceholderUriFromUrl($this->action->url);

    $property = ClassGen::property('path', 'private', $path, 'string');
    $class->addPropertyFromGenerator($property);

    // Properties and constructor parameters
    /** @var ParameterGenerator[] $parameters */
    $parameters = [];

    // Get properties
    $getParams = $this->generateGetParamsFromUrl($this->action->url);
    if (!empty($getParams))
    {
      foreach ($getParams as $getParam)
      {
        $class->addPropertyFromGenerator(
          ClassGen::property($getParam, 'public', null)
        );

        $parameter = new ParameterGenerator($getParam);
        $parameter->setDefaultValue(null);

        $parameters[$getParam] = $parameter;
      }
    }

    // Post properties
    if (!empty($this->action->postParams))
    {
      foreach ($this->action->postParams as $name => $type)
      {
        if ($class->hasProperty($name))
        {
          continue;
        }

        $class->addPropertyFromGenerator(
          ClassGen::property($name, 'public', null, $type)
        );

        $parameter = new ParameterGenerator($name, $type);
        $parameter->setDefaultValue(null);

        $parameters[$name] = $parameter;
      }
    }

    // Constructor
    if (!empty($parameters))
    {
      $constructor = ClassGen::constructor($parameters);
      $class->addMethodFromGenerator($constructor);
    }

    // Create method
    $create = ClassGen::method('create', [], 'public', $this->getCreateBody());
    $class->addMethodFromGenerator($create);

    // Setters
    foreach ($parameters as $parameter)
    {
      $class->addMethodFromGenerator(
        ClassGen::setter($parameter->getName(), $parameter->getType())
      );
    }

    return $class;
  }
149732
function createEntity(html, id) {
    let $ = parser.load(html)

    let table = $('tr.past')

    let states = utils.tableParser(table, {
        date: {
            idx: 3,
            mandatory: true
        },
        hours: {
            idx: 5,
            mandatory: true
        },
        state: {
            idx: 7,
            mandatory: true
        },
        area: {
            idx: 9,
            mandatory: false
        }
    }).map(line => {
        let d = line.date + ' ' + line.hours
        return {
            date: moment.tz(d, "DD/MM/YYYY HH:mm", zone).format(),
            state: line.state,
            area: line.area
        }
    })

    return new EntityInfo({
        id: id,
        states: states
    })
}