Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Classes/Domain/Model/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ class Page extends AbstractEntity
*/
protected $doktype;

/**
* @var string
*/
protected $slug;

/**
* @param string $module
*/
Expand Down Expand Up @@ -119,4 +124,21 @@ public function getDoktype()
{
return $this->doktype;
}

/**
* @return string
*/
public function getSlug(): string
{
return $this->slug;
}

/**
* @param string $slug
* @return Page
*/
public function setSlug(string $slug)
{
$this->slug = $slug;
}
}
60 changes: 38 additions & 22 deletions Classes/Domain/Repository/PageRepository.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
<?php

namespace PunktDe\PtExtbase\Domain\Repository;

use PunktDe\PtExtbase\Domain\Model\Page;
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;

/***************************************************************
* Copyright notice
*
* (c) 2010-2012 Daniel Lienert <daniel@lienert.cc>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* Copyright notice
*
* (c) 2010-2012 Daniel Lienert <daniel@lienert.cc>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

/**
* Repository for Pages
Expand Down Expand Up @@ -61,7 +63,7 @@ public function findPagesInPid($pid)
$pages = $query->matching(
$query->equals('pid', $pid)
)
->execute();
->execute();
return $pages;
}

Expand Down Expand Up @@ -124,4 +126,18 @@ protected function getSubpagesOfUid($uid, $respectEnableFields, $respectDeletedF

return $returnArray;
}

/**
* @param string $slug
* @return array|null
*/
public function findOneBySlug(string $slug): ?Page
{
$query = $this->createQuery();
return $query->matching(
$query->equals('slug', $slug)
)
->execute()
->getFirst();
}
}
120 changes: 0 additions & 120 deletions Classes/Utility/RealUrl.php

This file was deleted.

54 changes: 0 additions & 54 deletions Classes/Utility/RealUrl/UrlDecoder.php

This file was deleted.

Loading