Inserts the given UrlWildcard.
abstract public insertUrlWildcard ( eZ\Publish\SPI\Persistence\Content\UrlWildcard $urlWildcard ) : mixed | ||
$urlWildcard | eZ\Publish\SPI\Persistence\Content\UrlWildcard | |
return | mixed | UrlWildcard id |
/** * Inserts the given UrlWildcard. * * @param \eZ\Publish\SPI\Persistence\Content\UrlWildcard $urlWildcard * * @return mixed */ public function insertUrlWildcard(UrlWildcard $urlWildcard) { try { return $this->innerGateway->insertUrlWildcard($urlWildcard); } catch (DBALException $e) { throw new \RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new \RuntimeException('Database error', 0, $e); } }
/** * Creates a new url wildcard * * @param string $sourceUrl * @param string $destinationUrl * @param boolean $forward * * @return \eZ\Publish\SPI\Persistence\Content\UrlWildcard */ public function create($sourceUrl, $destinationUrl, $forward = false) { $urlWildcard = $this->mapper->createUrlWildcard($sourceUrl, $destinationUrl, $forward); $urlWildcard->id = $this->gateway->insertUrlWildcard($urlWildcard); return $urlWildcard; }