<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Nav\Type; use ModStart\Core\Type\BaseType; class NavOpenType implements BaseType { const CURRENT_WINDOW = 1; const NEW_BLANK = 2; public static function getList() { return array(self::CURRENT_WINDOW => '当前窗口', self::NEW_BLANK => '新窗口'); } public static function getBlankAttributeFromValue($Q_Y0Y) { goto VFRPC; VFRPC: if (empty($Q_Y0Y)) { return ''; } goto VEm6w; VEm6w: if (is_array($Q_Y0Y)) { $Q_Y0Y = isset($Q_Y0Y['openType']) ? $Q_Y0Y['openType'] : null; } goto aY_IZ; sh1nl: return ''; goto Ya70t; aY_IZ: switch ($Q_Y0Y) { case self::NEW_BLANK: return 'target="_blank"'; } goto sh1nl; Ya70t: } }