コード例 #1
0
ファイル: MergeListener.php プロジェクト: Maksold/platform
 /**
  * @param EntityMetadata $entityMetadata
  *
  * @return bool
  */
 protected function isApplicableNoteActivity(EntityMetadata $entityMetadata)
 {
     if ($this->activityListChainProvider->isApplicableTarget($entityMetadata->getClassName(), Note::ENTITY_NAME)) {
         return true;
     }
     return false;
 }
コード例 #2
0
 public function testIsApplicableTargetForNotConfigurableTargetEntity()
 {
     $targetClassName = 'Test\\NotConfigurableTargetEntity';
     $activityClassName = TestActivityProvider::ACTIVITY_CLASS_NAME;
     $this->configManager->expects($this->any())->method('hasConfig')->with($targetClassName)->willReturn(false);
     $this->configManager->expects($this->never())->method('getId');
     $this->assertFalse($this->provider->isApplicableTarget($targetClassName, $activityClassName));
 }
コード例 #3
0
ファイル: PlaceholderFilter.php プロジェクト: woei66/platform
 /**
  * Checks whether the activity list has at least one accessible activity type
  *
  * @param string $entityClass
  *
  * @return bool
  */
 protected function hasApplicableActivityAssociations($entityClass)
 {
     $supportedActivities = $this->activityListProvider->getSupportedActivities();
     foreach ($supportedActivities as $supportedActivity) {
         if ($this->activityListProvider->isApplicableTarget($entityClass, $supportedActivity)) {
             return true;
         }
     }
     return false;
 }