我想在访问页面时从页面中删除链接。但是...如何,如果伪类 :visited 有隐私限制?(例如,我不能使用 display: none)
(我想怎么做) 示例:
.someclass a:link {display:block;}
.someclass a:visited {display:none;}
谢谢你们。
详细信息:我也将使用外部链接,因此我无法使用 jquery cookie 或 localstore,并且链接将通过电子邮件发送,因此我无法在“X”类中单击时使用 jquery。
我已经创建了一个具有安全功能的提供者。按照文档,我创建了自己的 ExpressionLanguage 类并注册了提供程序。
namespace AppBundle\ExpressionLanguage;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
class ExpressionLanguage extends BaseExpressionLanguage
{
public function __construct(ParserCacheInterface $parser = null, array $providers = array())
{
// prepend the default provider to let users override it easily
array_unshift($providers, new AppExpressionLanguageProvider());
parent::__construct($parser, $providers);
}
}
Run Code Online (Sandbox Code Playgroud)
我使用的是相同的功能,lowercase那就是在doc。但是现在,我不知道如何注册要在我的 Symfony 项目中加载的 ExpressionLanguage 类。
每次尝试使用注释中的自定义函数加载页面时,我都会收到此错误:
位置 26 附近不存在函数“小写”。
我正在使用 Symfony 2.7.5。