Entity/User.php
public function createDefaultOrganization()
    {
        $organization = new Organization();
        $organization->setName($this->getUsername());

        $this->organizations[] = $organization;
    }
public function createDefaultOrganization()
    {
        $organization = new Organization();
        $organization->setName($this->getUsername());

        $this->organizations[] = $organization;
    }
public function createDefaultOrganization ( ) { $ organization = new Organization ( ) ; $ organization -> setName ( $ this -> getUsername ( ) ) ; $ this -> organizations [ ] = $ organization ; }
Create default Organization

@author Tom Haskins-Vaughan <tom@tomhv.uk>
@since  0.8.0

@ORM\PrePersist
Create default Organization