本文整理汇总了PHP中Program::getIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP Program::getIcon方法的具体用法?PHP Program::getIcon怎么用?PHP Program::getIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Program
的用法示例。
在下文中一共展示了Program::getIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAttachmentsTableHtml
public function getAttachmentsTableHtml($att_folder)
{
?>
<table cellpadding="3">
<caption><h2 data-trans-key="context-edit-page"></h2></caption>
<tr>
<th width="5%" data-trans-key="context-edit-page"></th>
<th width="30%" data-trans-key="context-edit-page"></th>
<th width="60%" data-trans-key="context-edit-page"></th>
<th width="5%" data-trans-key="context-edit-page"></th>
</tr>
<?php
if (is_array($this->attachments)) {
foreach ($this->attachments as $attachment) {
$odkaz = "";
$ikona = "";
$checkbox = "";
if ($attachment instanceof Image) {
$odkaz = "attachments/{$att_folder}/" . $attachment->getContext_id() . "/images/big/" . $attachment->getId() . "." . pathinfo($attachment->getName(), PATHINFO_EXTENSION);
$ikona = Image::getIcon();
$checkbox = "image;" . $attachment->getId();
} else {
if ($attachment instanceof Program) {
$odkaz = "attachments/{$att_folder}/" . $attachment->getContext_id() . "/programs/" . $attachment->getId() . "." . pathinfo($attachment->getName(), PATHINFO_EXTENSION);
$ikona = Program::getIcon();
$checkbox = "program;" . $attachment->getId();
} else {
$odkaz = "http://www.youtube.com/embed/" . $attachment->getName();
$ikona = Video::getIcon();
$checkbox = "video;" . $attachment->getId();
}
}
$odkaz = "<a href=" . $odkaz . ' target="_blank">' . $odkaz;
echo "<tr>";
echo "<td width=\"5%\" align=\"center\"> <img src=" . $ikona . "></td>";
echo "<td width=\"30%\">" . $attachment->getName() . "</td>";
echo "<td width=\"60%\"> " . $odkaz . " </td>";
echo '<td width=\\"5%\\" align="center"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="' . $checkbox . '"></td>';
echo "</tr>";
}
}
?>
</table>
<?php
}