Example #1
0
 /**
  * Insert a given entry into the list on the given index by shifting all others.
  *
  * @param array                                                $list
  * @param int                                                  $index
  * @param \Propel\Bundle\PropelAclBundle\Model\Acl\Entry\Entry $entry
  *
  * @return \Propel\Bundle\PropelAclBundle\Security\Acl\Domain\MutableAcl $this
  */
 protected function insertToList(array &$list, $index, Entry $entry)
 {
     $this->isWithinBounds($list, $index);
     if ($entry instanceof FieldEntry) {
         $this->updateFields($entry->getField());
     }
     $list = array_merge(array_slice($list, 0, $index), array($entry), array_splice($list, $index));
     return $this;
 }