public function getRoles() { $roles = array(); foreach ($this->roles->getValues() as $roleObject) { $roles[] = $roleObject->getName(); } return $roles; }
function it_applies_choice_filter_on_datasource_for_collection_value(FilterDatasourceAdapterInterface $datasource, Collection $collection, $utility) { $collection->count()->willReturn(2); $collection->getValues()->willReturn(['foo', 'bar']); $utility->applyFilter($datasource, 'data_name_key', 'IN', ['foo', 'bar'])->shouldBeCalled(); $this->apply($datasource, ['value' => $collection, 'type' => AjaxChoiceFilterType::TYPE_CONTAINS]); }
public function testGetValues() { $this->_coll[] = 'one'; $this->_coll[] = 'two'; $this->assertEquals(array('one', 'two'), $this->_coll->getValues()); }
/** * {@inheritdoc} */ public function getValues() { $this->initialize(); return $this->coll->getValues(); }
/** * Get role. * * @return array */ public function getRoles() { return $this->roles->getValues(); }
/** * Get user list from group * @return array */ public function getUsers() { return $this->users->getValues(); }
/** * Get options. * * @return array */ public function getOptions($ac = false) { return $ac ? $this->options : $this->options->getValues(); }
/** * Get consolidated accounts collection * * @return ConsolidatedAccountsCollection */ public function getConsolidatedAccountsCollection() { $elements = array_merge(array($this), $this->consolidatedAccounts->getValues()); return new ConsolidatedAccountsCollection($elements); }
public static function buildOrderFulfillmentsData(Collection $collection) { return array_map(function (OrderFulfillment $fulfillment) { return $fulfillment->buildOrderFulfillmentData(); }, $collection->getValues()); }
/** * Get API Settings. * * @return array */ public function getApiSettings() { return $this->apiSettings->getValues(); }
/** * Get account. * * @return array */ public function getAccounts() { return $this->accounts->getValues(); }
/** * * @param bool $ac * * @return Collection $events */ public function getEvents($ac = false) { return $ac ? $this->events : $this->events->getValues(); }
/** * {@inheritdoc} */ public function getValues() { return $this->inner->getValues(); }
/** * {@inheritDoc} */ public function getValues() { return $this->collection->getValues(); }
/** * @dataProvider provideCollection */ public function testGetValues(Collection $coll, array $elements) { $this->assertSame(array_values($elements), $coll->getValues()); }
/** * Get groups * * @return array */ public function getGroups() { return $this->groups->getValues(); }