protected function getTopMostParent(Asset $i)
 {
     $parent = $i->getParent();
     while ($parent->getParent() instanceof Asset) {
         $parent = $parent->getParent();
     }
     return $parent;
 }
예제 #2
0
 public function getNestedAssets(Asset $asset)
 {
     return $this->createQueryBuilder('a')->select('a')->where('a.parent = :id')->andWhere('a.flag_id != :flag')->andWhere('a.flag_id != :flag2')->setParameter('id', $asset->getId())->setParameter('flag', 62)->setParameter('flag2', 0)->getQuery();
 }
예제 #3
0
 public function flattenAssets(Asset $asset)
 {
     $list = [$asset];
     $this->helperFlatten($asset->getContents()->toArray(), $list);
     return $list;
 }
 /**
  * Creates a form to delete a Asset entity.
  *
  * @param Asset $asset The Asset entity
  *
  * @return \Symfony\Component\Form\Form The form
  */
 private function createDeleteForm(Asset $asset)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('asset_delete', array('id' => $asset->getId())))->setMethod('DELETE')->getForm();
 }
예제 #5
0
파일: Series.php 프로젝트: OKTOTV/FLUX2
 /**
  * Remove files
  *
  * @param \AppBundle\Entity\Asset $files
  */
 public function removeFile(\AppBundle\Entity\Asset $files)
 {
     $files->setSeries(Null);
     $this->files->removeElement($files);
 }