本文整理汇总了PHP中Artist::setExhibitions方法的典型用法代码示例。如果您正苦于以下问题:PHP Artist::setExhibitions方法的具体用法?PHP Artist::setExhibitions怎么用?PHP Artist::setExhibitions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Artist
的用法示例。
在下文中一共展示了Artist::setExhibitions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBeanFromRequest
/**
* Populates the Person object from the request
* @return bean Person
*/
private function getBeanFromRequest()
{
global $logger;
$logger->debug(get_class($this) . "::getBeanFromRequest()");
$person = new Artist($_REQUEST);
// related events
$events = array();
if (isset($_REQUEST['exhibition'])) {
foreach ($_REQUEST['exhibition'] as $oid) {
$event = new Exhibition();
$event->setOid($oid);
$events[] = $event;
}
}
if ($events) {
$logger->debug("Number of related exhibitions in the form: " . count($events));
$person->setExhibitions($events);
}
// gallery
if (isset($_REQUEST['gallery'])) {
$person->setGallery($_REQUEST['gallery']);
}
return $person;
}