Pimcore\Model\Asset::getSiblings PHP Méthode

getSiblings() public méthode

Get a list of the sibling assets
public getSiblings ( ) : array
Résultat array
    public function getSiblings()
    {
        if ($this->siblings === null) {
            $list = new Asset\Listing();
            // string conversion because parentId could be 0
            $list->addConditionParam("parentId = ?", (string) $this->getParentId());
            $list->addConditionParam("id != ?", $this->getId());
            $list->setOrderKey("filename");
            $list->setOrder("asc");
            $this->siblings = $list->load();
        }
        return $this->siblings;
    }