Skip to content

Commit

Permalink
FindAll for organizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngodfraind committed Feb 17, 2016
1 parent 27fe302 commit ee995da
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
14 changes: 13 additions & 1 deletion Controller/API/Organization/OrganizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function deleteOrganizationAction(Organization $organization)
return array('success');
}

/**
/**
* @View(serializerGroups={"api"})
* @ApiDoc(
* description="Returns the organizations list",
Expand All @@ -109,6 +109,18 @@ public function getOrganizationsAction()
return $this->organizationManager->getRoots();
}

/**
* @View(serializerGroups={"organization_list"})
* @ApiDoc(
* description="Returns the organizations list",
* views = {"organization"}
* )
*/
public function getOrganizationListAction()
{
return $this->organizationManager->getAll();
}

/**
* @View(serializerGroups={"api"})
* @ApiDoc(
Expand Down
6 changes: 3 additions & 3 deletions Entity/Organization/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Organization
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"api"})
* @Groups({"api", "organization_list"})
*/
protected $id;

Expand All @@ -48,14 +48,14 @@ class Organization
/**
* @ORM\Column()
* @Assert\NotBlank()
* @Groups({"api"})
* @Groups({"api", "organization_list"})
*/
protected $name;

/**
* @ORM\Column(nullable=true)
* @Assert\Email()
* @Groups({"api"})
* @Groups({"api", "organization_list"})
*/
protected $email;

Expand Down
1 change: 0 additions & 1 deletion Event/UserAddFilterEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function removeFilter($filter)
if (($key = array_search($filter, $this->filters)) !== false) {
unset($filters[$key]);
}

}

public function getFilters()
Expand Down

0 comments on commit ee995da

Please sign in to comment.