本文整理汇总了PHP中collection::get_label方法的典型用法代码示例。如果您正苦于以下问题:PHP collection::get_label方法的具体用法?PHP collection::get_label怎么用?PHP collection::get_label使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collection
的用法示例。
在下文中一共展示了collection::get_label方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSet_label
public function testSet_label()
{
self::$object->set_name('pretty name');
self::$object->set_label('fr', 'french label');
self::$object->set_label('en', 'english label');
self::$object->set_label('nl', null);
self::$object->set_label('de', null);
$this->assertEquals('french label', self::$object->get_label('fr'));
$this->assertEquals('english label', self::$object->get_label('en'));
$this->assertEquals('pretty name', self::$object->get_label('nl'));
$this->assertEquals('pretty name', self::$object->get_label('de'));
$this->assertNull(self::$object->get_label('nl', false));
$this->assertNull(self::$object->get_label('de', false));
}
示例2: list_collection
/**
* Retrieve detailled informations about one collection
*
* @param collection $collection
*
* @return array
*/
private function list_collection(\collection $collection)
{
return ['base_id' => $collection->get_base_id(), 'collection_id' => $collection->get_coll_id(), 'name' => $collection->get_name(), 'labels' => ['fr' => $collection->get_label('fr'), 'en' => $collection->get_label('en'), 'de' => $collection->get_label('de'), 'nl' => $collection->get_label('nl')], 'record_amount' => $collection->get_record_amount()];
}
示例3: getCollectionSummary
private function getCollectionSummary(\collection $collection, $userData)
{
return ['coll-name' => $collection->get_label($this->locale), 'can-register' => $collection->isRegistrationEnabled(), 'cgu' => $collection->getTermsOfUse(), 'registration' => $this->userHasRequestedARegistrationOnCollection($collection, $userData)];
}
示例4: list_collection
/**
* Retrieve detailled informations about one collection
*
* @param collection $collection
* @return array
*/
protected function list_collection(collection $collection)
{
$ret = ['base_id' => $collection->get_base_id(), 'collection_id' => $collection->get_coll_id(), 'name' => $collection->get_name(), 'labels' => ['fr' => $collection->get_label('fr'), 'en' => $collection->get_label('en'), 'de' => $collection->get_label('de'), 'nl' => $collection->get_label('nl')], 'record_amount' => $collection->get_record_amount()];
return $ret;
}