Skip to content

Commit

Permalink
Merge pull request #13 from fullfatthings/find_all
Browse files Browse the repository at this point in the history
Works nicely
  • Loading branch information
Dan-Ashdown committed Jul 16, 2014
2 parents a40171d + ea31c77 commit 90733e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions entity_decorator.module
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ abstract class EntityDecorator {
}
}

/**
* Find all instances.
* @return Array of instances of subclass of EntityDecorator
*/
static public function findAll() {
return self::getFinder()->execute();
}

static protected function getFinder() {
$class = get_called_class();
return new EntityDecoratorFinder($class, $class::$bundle, $class::$entityType);
Expand Down

0 comments on commit 90733e9

Please # to comment.