getPageStatusIcon() публичный статический Метод

Calculate the page status icon name based on the page parameters
public static getPageStatusIcon ( PageModel | Result | object $objPage ) : string
$objPage PageModel | Result | object The page object
Результат string The status icon name
Пример #1
0
 /**
  * Add an image to each page in the tree
  *
  * @param array         $row
  * @param string        $label
  * @param DataContainer $dc
  * @param string        $imageAttribute
  * @param boolean       $blnReturnImage
  * @param boolean       $blnProtected
  *
  * @return string
  */
 public static function addPageIcon($row, $label, DataContainer $dc = null, $imageAttribute = '', $blnReturnImage = false, $blnProtected = false)
 {
     if ($blnProtected) {
         $row['protected'] = true;
     }
     $image = \Controller::getPageStatusIcon((object) $row);
     $imageAttribute = trim($imageAttribute . ' data-icon="' . \Controller::getPageStatusIcon((object) array_merge($row, array('published' => '1'))) . '" data-icon-disabled="' . \Controller::getPageStatusIcon((object) array_merge($row, array('published' => ''))) . '"');
     // Return the image only
     if ($blnReturnImage) {
         return \Image::getHtml($image, '', $imageAttribute);
     }
     // Mark root pages
     if ($row['type'] == 'root' || \Input::get('do') == 'article') {
         $label = '<strong>' . $label . '</strong>';
     }
     // Add the breadcrumb link
     $label = '<a href="' . \Backend::addToUrl('pn=' . $row['id']) . '" title="' . \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['selectNode']) . '">' . $label . '</a>';
     // Return the image
     return '<a href="contao/main.php?do=feRedirect&amp;page=' . $row['id'] . '" title="' . \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['view']) . '"' . ($dc->table != 'tl_page' ? ' class="tl_gray"' : '') . ' target="_blank">' . \Image::getHtml($image, '', $imageAttribute) . '</a> ' . $label;
 }