You are here

public function AcquiaDAM_Assets_Folder::getParents in Media: Acquia DAM 7

Get parents of this folder.

Parameters

int[] $parents: An array of existing parent IDs.

Return value

int[] An array of parent IDs.

File

src/AcquiaDAM/AcquiaDAM_Assets_Folder.inc, line 108

Class

AcquiaDAM_Assets_Folder
Acquia DAM asset implmentation for Folder assets.

Code

public function getParents(array $parents = []) {
  if (!empty($this['parent'])) {
    $parents[] = $this['parent'];
    $parent = new static($this['parent']);
    return $parent
      ->getParents($parents);
  }
  return $parents;
}