ArticleType::getStatus PHP Method

getStatus() public method

Returns 'hidden' if the article type should not be visible, and 'shown' if it should be.
public getStatus ( ) : string
return string (shown|hidden)
    public function getStatus()
    {
        return $this->m_metadata->getStatus();
    }

Usage Example

Example #1
0
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Template Type Name"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Fields"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Display Name"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Translate"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Show/Hide"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php putGS("Comments enabled?"); ?></B></TD>
	<?php  if ($g_user->hasPermission("DeleteArticleTypes")) { ?>
	<TD ALIGN="LEFT" VALIGN="TOP"><B><?php  putGS("Delete"); ?></B></TD>
	<?php  } ?>
</TR>
<?php
$color = 0;
$i = 0;
foreach ($articleTypes as $articleType) {
	$currentArticleType = new ArticleType($articleType);
	if ($currentArticleType->getStatus() == 'hidden') {
		$hideShowText = getGS('show');
		$hideShowStatus = 'show';
		$hideShowImage = "is_hidden.png";
	} else {
		$hideShowText = getGS('hide');
		$hideShowStatus = 'hide';
		$hideShowImage = "is_shown.png";
	}

	if ($currentArticleType->commentsEnabled()) {
		$commentChangeText = getGS('deactivate');
		$commentImage = "is_shown.png";
	} else {
		$commentChangeText = getGS('activate');
		$commentImage = "is_hidden.png";