/** * * @param FTL_Binding $tag * @return string * */ public static function tag_article_deny(FTL_Binding $tag) { // Set this tag as "process tag" $tag->setAsProcessTag(); // 1. Try to get from tag's data array $value = $tag->getValue('deny_code', 'article'); $resource = 'frontend/article/' . $tag->getValue('id_article', 'article'); if (Authority::cannot('access', $resource, NULL, TRUE)) { return self::output_value($tag, $value); } else { if ($tag->getAttribute('is') == '') { self::$trigger_else = 0; return self::wrap($tag, $tag->expand()); } } return ''; }