Ejemplo n.º 1
0
    // Put tags into single string
    $tagString = '';
    if ($table->is_downloading()) {
        foreach ($message->getTags() as $tag) {
            if ($tagString != '') {
                $tagString .= ', ';
            }
            $tagString .= $tag->getName();
        }
    } else {
        foreach ($message->getTags() as $tag) {
            $tagString .= html_writer::tag('span', $tag->getName(), array('class' => 'mtxtAppliedTag'));
        }
    }
    array_push($tableRow, $tagString);
    if (!$table->is_downloading()) {
        array_push($tableRow, $output->render($tagButton) . $output->render($deleteButton) . $replyLink);
    }
    // Turn tag names into CSS classes
    $classString = '';
    foreach ($message->getTags() as $tag) {
        $classString .= ' ' . MoodletxtStringHelper::convertToValidCSSIdentifier($tag->getName());
    }
    $table->add_data($tableRow, $classString);
}
// Output everything and run away
$table->finish_output();
if (!$table->is_downloading()) {
    $inboxForm->display();
    echo $output->footer();
}