Skip to content

Commit

Permalink
Source migration for neos 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwitte committed Apr 23, 2017
1 parent dd62a9b commit 883e8e1
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 37 deletions.
6 changes: 3 additions & 3 deletions Classes/TechDivision/DocViewer/AccessManager.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TechDivision\DocViewer;

use TYPO3\Flow\Annotations as Flow;
use TYPO3\Neos\Controller\Module\AbstractModuleController;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Controller\Module\AbstractModuleController;

/**
*
Expand All @@ -20,7 +20,7 @@ class AccessManager extends AbstractModuleController

/**
* @Flow\Inject
* @var \TYPO3\Flow\Package\PackageManagerInterface
* @var \Neos\Flow\Package\PackageManagerInterface
*/
protected $packageManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use TechDivision\DocViewer\Exceptions\ParsingNotAllowedException;
use TechDivision\DocViewer\File\Parser;
use TechDivision\DocViewer\File\Tree;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Neos\Controller\Module\AbstractModuleController;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Controller\Module\AbstractModuleController;

/**
*
Expand All @@ -20,7 +20,7 @@ class ModuleController extends AbstractModuleController

/**
* @Flow\Inject
* @var \TYPO3\Flow\Package\PackageManagerInterface
* @var \Neos\Flow\Package\PackageManagerInterface
*/
protected $packageManager;

Expand Down Expand Up @@ -85,7 +85,8 @@ public function listAction() {
'version' => $package->getInstalledVersion(),
'name' => $package->getComposerManifest('name'),
'type' => $package->getComposerManifest('type'),
'description' => $package->getPackageMetaData()->getDescription()
//'description' => $package->getPackageMetaData()->getDescription()
'description' => $package->getComposerManifest('description')
);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use TechDivision\DocViewer\Exceptions\PackageNotAccessibleException;
use TechDivision\DocViewer\File\Parser;
use TechDivision\DocViewer\Util;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* Rudimentary service for resources. Flow does not allow serving static files which are not in the resource folder.
Expand All @@ -17,7 +17,7 @@
*
* @Flow\Scope("singleton")
*/
class ResourceController extends \TYPO3\Flow\Mvc\Controller\ActionController
class ResourceController extends \Neos\Flow\Mvc\Controller\ActionController
{

/**
Expand All @@ -28,7 +28,7 @@ class ResourceController extends \TYPO3\Flow\Mvc\Controller\ActionController

/**
* @Flow\Inject
* @var \TYPO3\Flow\Package\PackageManagerInterface
* @var \Neos\Flow\Package\PackageManagerInterface
*/
protected $packageManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/**
* File is not inside documentation exception
*/
class FileNotInsideDocumentationException extends \TYPO3\Flow\Exception
class FileNotInsideDocumentationException extends \Neos\Flow\Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/**
* Package is not accessible exception
*/
class PackageNotAccessibleException extends \TYPO3\Flow\Exception
class PackageNotAccessibleException extends \Neos\Flow\Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/**
* Parsing is not allowed exception
*/
class ParsingNotAllowedException extends \TYPO3\Flow\Exception
class ParsingNotAllowedException extends \Neos\Flow\Exception
{
}
8 changes: 4 additions & 4 deletions Classes/TechDivision/DocViewer/File/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
use TechDivision\DocViewer\Exceptions\FileNotInsideDocumentationException;
use TechDivision\DocViewer\Util;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

class Node {

Expand All @@ -18,7 +18,7 @@ class Node {


/**
* @var \TYPO3\Flow\Package\PackageInterface $package
* @var \Neos\Flow\Package\PackageInterface $package
*/
protected $package;

Expand Down Expand Up @@ -59,10 +59,10 @@ class Node {

/**
* Node constructor.
* @param \TYPO3\Flow\Package\PackageInterface $package
* @param \Neos\Flow\Package\PackageInterface $package
* @param $path
*/
public function __construct(\TYPO3\Flow\Package\PackageInterface $package, $path)
public function __construct(\Neos\Flow\Package\PackageInterface $package, $path)
{
$this->package = $package;
$this->path = trim(str_replace(Util::getDocumentPath($package), '', $path), "/");
Expand Down
2 changes: 1 addition & 1 deletion Classes/TechDivision/DocViewer/File/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This file is part of the TechDivision.DocViewer package.
*/
use TechDivision\DocViewer\Exceptions\ParsingNotAllowedException;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

class Parser {

Expand Down
10 changes: 5 additions & 5 deletions Classes/TechDivision/DocViewer/File/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This file is part of the TechDivision.DocViewer package.
*/
use TechDivision\DocViewer\Util;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

class Tree {

Expand All @@ -29,10 +29,10 @@ class Tree {

/**
* Tree constructor.
* @param \TYPO3\Flow\Package\PackageInterface $package
* @param \Neos\Flow\Package\PackageInterface $package
* @param $baseUri
*/
public function __construct(\TYPO3\Flow\Package\PackageInterface $package, $baseUri)
public function __construct(\Neos\Flow\Package\PackageInterface $package, $baseUri)
{
$this->parser = new Parser($baseUri);
$this->rootNode = $this->buildFsNode($package);
Expand Down Expand Up @@ -101,11 +101,11 @@ public function isDirectoryWithContent() {

/**
* Builds up given folder path as composite
* @param \TYPO3\Flow\Package\PackageInterface $package
* @param \Neos\Flow\Package\PackageInterface $package
* @param string $path
* @return null|Node
*/
protected function buildFsNode(\TYPO3\Flow\Package\PackageInterface $package, $path = null) {
protected function buildFsNode(\Neos\Flow\Package\PackageInterface $package, $path = null) {

if(!$path) {
$path = Util::getDocumentPath($package);
Expand Down
4 changes: 2 additions & 2 deletions Classes/TechDivision/DocViewer/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* This file is part of the TechDivision.DocViewer package.
*/
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

class Util {

Expand All @@ -18,7 +18,7 @@ class Util {
/**
* Get the documentation path
*
* @param \TYPO3\Flow\Package\PackageInterface $package
* @param \Neos\Flow\Package\PackageInterface $package
* @return string
*/
public static function getDocumentPath($package) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use TechDivision\DocViewer\File\Node;
use TechDivision\DocViewer\File\Parser;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper;
use Neos\Flow\Annotations as Flow;
use Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper;

/**
* Renders a resource url by given packageKey and filePath
Expand All @@ -13,7 +13,7 @@ class ResourceUrlViewHelper extends AbstractViewHelper
{
/**
* @Flow\Inject
* @var \TYPO3\Flow\Package\PackageManagerInterface
* @var \Neos\Flow\Package\PackageManagerInterface
*/
protected $packageManager;

Expand Down
4 changes: 2 additions & 2 deletions Configuration/Policy.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
privilegeTargets:
'TYPO3\Flow\Security\Authorization\Privilege\Method\MethodPrivilege':
'Neos\Flow\Security\Authorization\Privilege\Method\MethodPrivilege':
'TechDivision.DocViewer:Module':
matcher: 'method(TechDivision\DocViewer\Controller\ModuleController->.*Action())'
'TechDivision.DocViewer:Module:Resource':
matcher: 'method(TechDivision\DocViewer\Controller\ResourceController->.*Action())'

roles:
'TYPO3.Neos:Editor':
'Neos.Neos:Editor':
privileges:
-
privilegeTarget: 'TechDivision.DocViewer:Module'
Expand Down
6 changes: 3 additions & 3 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TYPO3:
Neos:
Neos:
modules:
management:
Expand All @@ -18,11 +18,11 @@ TYPO3:
mvc:
routes:
'TechDivision.DocViewer':
position: 'before TYPO3.Neos'
position: 'before Neos.Neos'
security:
authentication:
providers:
Typo3BackendProvider:
'Neos.Neos:Backend':
requestPatterns:
'TechDivision.DocViewer:controllers':
pattern: 'ControllerObjectName'
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Layouts/Default.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="stylesheet" href="{f:uri.resource(path: 'resource://TYPO3.Twitter.Bootstrap/Public/2/css/bootstrap.min.css')}" />
<link rel="stylesheet" href="{f:uri.resource(path: 'resource://Neos.Twitter.Bootstrap/Public/2/css/bootstrap.min.css')}" />
<link rel="stylesheet" href="{f:uri.resource(path: 'resource://TechDivision.DocViewer/Public/Styles/Style.css')}" />

<f:flashMessages class="flashmessages" />
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
],
"license": "GPL-3.0+",
"require": {
"neos/neos": "2.3.*",
"erusev/parsedown": "*"
"neos/neos": "3.0.*",
"erusev/parsedown": "1.6.*"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "techdivision/docviewer",
"type": "typo3-flow-package",
"type": "neos-flow-package",
"description": "docviewer",
"version": "0.1.0",
"author": "Matthias Witte <[email protected]>",
Expand Down

0 comments on commit 883e8e1

Please sign in to comment.