29 parent::__construct();
33 $this->lng->loadLanguageModule(
'forum');
37 $this->
setTitle($this->lng->txt(
'frm_my_posting_drafts'));
39 $this->allow_moving =
true;
47 $cmd = $this->ctrl->getCmd(
'getHTML');
56 return self::$block_type;
75 return parent::getHTML();
84 $this->tpl->setVariable(
'SUBJECT', $draft[
'subject']);
85 $this->tpl->setVariable(
'SOURCE', $draft[
'source']);
86 $this->tpl->setVariable(
"HREF", $draft[
'href']);
99 $draft_as_array = array();
101 if (is_array($drafts_instances) && count($drafts_instances) > 0) {
102 foreach ($drafts_instances as $draft) {
104 if ((
int) $draft->getThreadId() == 0) {
108 $draft_as_array[
'subject'] = $draft->getPostSubject();
109 $draft_as_array[
'draft_id'] = $draft->getDraftId();
112 $draft_as_array[
'source'] = implode(
'/', $information);
113 $draft_as_array[
'create_date'] = $draft->getPostDate();
119 $params[
'cmd'] =
'editThreadDraft';
120 $params[
'draft_id'] = $draft->getDraftId();
123 $params[
'thr_pk'] = $draft->getThreadId();
124 $params[
'pos_pk'] = $draft->getPostId();
129 $data[] = $draft_as_array;
135 $this->
setRowTemplate(
'tpl.pd_frm_posting_drafts_row.html',
'Modules/Forum');
139 parent::fillDataSection();
142 if (count($this->
data) == 0) {
154 $tpl =
new ilTemplate(
'tpl.pd_frm_posting_drafts_row.html',
true,
true,
'Modules/Forum');
155 $tpl->setCurrentBlock(
'overview');
156 $tpl->setVariable(
'NUM_FRM_POSTING_DRAFTS', count($this->
data));
157 if (count($this->
data) == 1) {
158 $tpl->setVariable(
'TXT_FRM_POSTING_DRAFTS', $this->lng->txt(
'frm_posting_draft'));
160 $tpl->setVariable(
'TXT_FRM_POSTING_DRAFTS', $this->lng->txt(
'frm_posting_drafts'));
162 $tpl->parseCurrentBlock();
static getDraftInstancesByUserId($user_id)
static _lookupObjIdForForumId($a_for_id)
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
getOverview()
Get overview.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
__construct()
Constructor.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAllReferences($a_id)
get all reference ids of object
setColSpan($a_colspan)
Set Columns Span.
static collectPostInformationByPostId($post_id)
setImage($a_image)
Set Image.
setTitle($a_title)
Set Title.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setData($a_data)
Set Data.
special template class to simplify handling of ITX/PEAR
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setLimit($a_limit)
Set Limit.
This class represents a block method of a block.
Class ilForumPostingDraftsBlockGUI.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
getCurrentDetailLevel()
Get Current Detail Level.