本文整理匯總了PHP中Program::setDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP Program::setDescription方法的具體用法?PHP Program::setDescription怎麽用?PHP Program::setDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Program
的用法示例。
在下文中一共展示了Program::setDescription方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDemoProgramDetail
/**
* A sample detail bean for use in rendering the template.
* If a program is supplied, it will copy thevalues of the
* given bean over the top of the demo bean.
* @return
*/
private function getDemoProgramDetail($prgm)
{
require_once WEB_INF . '/beans/Performance.php';
require_once WEB_INF . '/beans/Schedule.php';
require_once WEB_INF . '/beans/Venue.php';
global $logger;
$logger->debug(get_class($this) . "::getDemoProgramDetail({$prgm})");
$bean = new Program();
$bean->setTitle("Demo Program Detail Bean");
$desc = "<p>This is a description of the program. Malian Grammy Award nominee Mamadou Diabate is a virtuoso kora player descended from a long line of Manding musician-storytellers. Dolor dignissim exerci feugiat. Lobortis ut, luptatum facilisis. Augue volutpat facilisis at, eum consequat adipiscing accumsan blandit molestie. </p>\n\t\t\t\t <p>Lobortis eros at hendrerit luptatum consequat feugiat ut facilisi commodo esse autem consequat at ex ullamcorper hendrerit wisi, commodo nostrud nisl wisi eum autem eu esse eu iriure. Tation, magna ad nibh at eum, ea praesent eum lorem eu erat enim commodo dolore?</p>\n \t\t\t\t <p>Crisare enim sed ex eros hendrerit blandit illum qui sciurus autem nulla enim luptatum. Quis enim eum feugait elit blandit, hendrerit consequat, velit ut luptatum nostrud wisi ea. Dignissim consequat dolore aliquam eum volutpat, wisi dolore et exerci nisl veniam luptatum ut ullamcorper consequatvel nulla delenit.</p>\n\t\t\t\t";
$bean->setDescription($desc);
$bean->setPrimaryGenre("Music");
// Performances
$perf = new Performance();
$schd = new Schedule();
$schd->setStartTime(time());
$perf->setSchedule($schd);
$logger->debug("Performance time: " . $perf->getSchedule()->getStartTime());
$perf->setTicketCode("21");
$bean->setChildren(array($perf));
$logger->debug("Number of set performaces: " . count($bean->getChildren()));
// Venues
$v1 = new Venue();
$v1->setName('Hurd Gallery');
$bean->setDefaultVenue($v1);
if (get_class($prgm) == 'Program') {
$prgm->setPerformances(null);
$option = new CopyBeanOption();
$option->setIgnoreNullValues(true);
BeanUtil::copyBean($prgm, $bean, $option);
}
return $bean;
}