Example #1
0
 /**
  * Find items by variant ID
  *
  * @param integer $variantId Variant ID to use
  *
  * @return array
  */
 public function getItemsByVariantId($variantId)
 {
     $items = $this->getItems();
     return \Includes\Utils\ArrayManager::filter($items, array($this, 'isItemVariantIdEqual'), $variantId);
 }
Example #2
0
 /**
  * Define memberships identificators array to remove
  *
  * @return array
  */
 protected function getMembershipIdsToDelete()
 {
     $ids = \XLite\Core\Request::getInstance()->deleted_memberships;
     return is_array($ids) && $ids ? array_flip(\Includes\Utils\ArrayManager::filter($ids, function ($value) {
         return $value !== '';
     })) : array();
 }