13/07
2016
dev-master
9999999-devSymfony KolinaCustomerBundle
MIT
The Requires
The Development Requires
Symfony KolinaCustomerBundle
Simplified management clients, extensible and integrated with FOSUserBundle, (*1)
$ composer require kolinalabs/customer-bundle
After downloading the package, (*2)
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Kolina\CustomerBundle\KolinaCustomerBundle(), // ... ); }
<?php // src/AppBundle/Entity/Customer.php namespace AppBundle\Entity; use Kolina\CustomerBundle\Entity\Customer as AbstractCustomer; /** * Customer */ class Customer extends AbstractCustomer { // Your custom properties and methods }
# app/config.yml kolina_customer: entity: AppBundle\Entity\Customer
/** * @return \Kolina\CustomerBundle\Entity\CustomerManager */ private function getCustomerManager() { return $this->get('kolina_customer.manager'); }
// Create Customer Object ... $manager = $this->getCustomerManager(); $customer = $manager->create(); $customer ->setFirstname('Foo') ->setLastname('Bar') //... other setter methods - //... see \Kolina\CustomerBundle\Entity\CustomerInterface ; $manager->save($customer); ...
Symfony KolinaCustomerBundle
MIT