protected function getAssocEntities(AssociationList $assoc) { if ($assoc->hasEntities()) { return $assoc->getEntities(); } else { return $this->entity->callGetter($assoc->getPropertyName()); } }
public function testAcceptance() { // es gibt kein Default, dass sieht scheise aus $assoc = new AssociationList('sounds', "Wird als Stimme in den Sounds:\n%list% benutzt."); $assoc->withLabel('label')->joinedWith(',<br />'); $this->assertInstanceOf('Psc\\CMS\\AssociationList', $assoc); $this->assertInstanceOf('Closure', $assoc->getWithLabel()); $this->assertEquals('sounds', $assoc->getPropertyName()); $this->assertEquals("Wird als Stimme in den Sounds:\n%list% benutzt.", $assoc->getFormat()); $this->assertEquals(',<br />', $assoc->getJoinedWith()); }