本文整理汇总了PHP中Thelia\Model\ConfigQuery::getObsoleteRewrittenUrlView方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigQuery::getObsoleteRewrittenUrlView方法的具体用法?PHP ConfigQuery::getObsoleteRewrittenUrlView怎么用?PHP ConfigQuery::getObsoleteRewrittenUrlView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thelia\Model\ConfigQuery
的用法示例。
在下文中一共展示了ConfigQuery::getObsoleteRewrittenUrlView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUpdateExistingUrl
/**
* @expectedException \Thelia\Form\Exception\FormValidationException
* @expectedExceptionCode 100
*/
public function testUpdateExistingUrl()
{
$object = null;
$event = $this->getUpdateSeoEvent($object);
/* get an existing url */
$existingUrl = RewritingUrlQuery::create()->filterByViewId($object->getId(), Criteria::NOT_EQUAL)->filterByRedirected(null)->filterByView(ConfigQuery::getObsoleteRewrittenUrlView(), Criteria::NOT_EQUAL)->findOne();
if (null === $existingUrl) {
$this->fail('use fixtures before launching test, there is not enough rewritten url');
}
$event->setUrl($existingUrl->getUrl());
$this->processUpdateSeoAction($event);
}
示例2: markRewrittenUrlObsolete
/**
* Mark the current URL as obseolete
*/
public function markRewrittenUrlObsolete()
{
RewritingUrlQuery::create()->filterByView($this->getRewrittenUrlViewName())->filterByViewId($this->getId())->update(array("View" => ConfigQuery::getObsoleteRewrittenUrlView()));
}