Skip to content

Commit

Permalink
Merge PR #482 from richardhj
Browse files Browse the repository at this point in the history
  • Loading branch information
baumannsven committed Apr 3, 2019
2 parents 4704dde + bfcf21e commit 7efbf06
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* @author David Molineus <[email protected]>
* @author Christian Schiffler <[email protected]>
* @author Sven Baumann <[email protected]>
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception;

use ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException;
namespace ContaoCommunityAlliance\DcGeneral\Exception;

/**
* Class DefinitionException.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
* @author David Molineus <[email protected]>
* @author Christian Schiffler <[email protected]>
* @author Sven Baumann <[email protected]>
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception;
namespace ContaoCommunityAlliance\DcGeneral\Exception;

/**
* Exception is thrown if an data definition is in edit only mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
* @author David Molineus <[email protected]>
* @author Christian Schiffler <[email protected]>
* @author Sven Baumann <[email protected]>
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception;
namespace ContaoCommunityAlliance\DcGeneral\Exception;

/**
* Class NotDeletableException.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
* @author David Molineus <[email protected]>
* @author Christian Schiffler <[email protected]>
* @author Sven Baumann <[email protected]>
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception;
namespace ContaoCommunityAlliance\DcGeneral\Exception;

/**
* Class NotDeletableException.
Expand Down
35 changes: 35 additions & 0 deletions src/Exception/NotEditableException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/**
* This file is part of contao-community-alliance/dc-general.
*
* (c) 2013-2019 Contao Community Alliance.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package contao-community-alliance/dc-general
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace ContaoCommunityAlliance\DcGeneral\Exception;

/**
* Class NotEditableException.
*
* This exception is thrown if a data definition does not support edit actions.
*/
class NotEditableException extends DefinitionException
{
/**
* The message template.
*
* @var string
*/
protected $message = 'Not able to perform edit action for data definition "%s".';
}
9 changes: 9 additions & 0 deletions src/deprecated-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@
*
* @package contao-community-alliance/dc-general
* @author Sven Baumann <[email protected]>
* @author Richard Henkenjohann <[email protected]>
* @copyright 2013-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

// This hack is to load the "old locations" of the classes.
use ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\EventListener\ColorPickerWizardListener;
use ContaoCommunityAlliance\DcGeneral\Exception\DefinitionException;
use ContaoCommunityAlliance\DcGeneral\Exception\EditOnlyModeException;
use ContaoCommunityAlliance\DcGeneral\Exception\NotCreatableException;
use ContaoCommunityAlliance\DcGeneral\Exception\NotDeletableException;

spl_autoload_register(
function ($class) {
static $classes = [
'\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception\DefinitionException' => DefinitionException::class,
'\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception\EditOnlyModeException' => EditOnlyModeException::class,
'\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception\NotCreatableException' => NotCreatableException::class,
'\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception\NotDeletableException' => NotDeletableException::class,
'\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Subscriber\ColorPickerWizardSubscriber' => ColorPickerWizardListener::class,
];

Expand Down

0 comments on commit 7efbf06

Please sign in to comment.