Skip to content

Commit

Permalink
Change bundle structure
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Aug 9, 2024
1 parent 60b0819 commit 1929e35
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 62 deletions.
60 changes: 30 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "sioweb/linkedelement",
"type": "contao-bundle",
"description": "LinkedElement for Contao 4",
"license": "MIT",
"authors": [
{
"name": "Sascha Weidner",
"email": "support@sioweb.de"
}
],
"require": {
"php": "^8.1",
"contao/core-bundle": "^4.13 || ^5.0"
},
"autoload": {
"psr-4": {
"Sioweb\\LinkedElementBundle\\": "src/"
},
"classmap": [
"src/Resources/contao/"
],
"exclude-from-classmap": [
"src/Resources/contao/config/",
"src/Resources/contao/dca/",
"src/Resources/contao/languages/",
"src/Resources/contao/templates/"
]
},
"extra": {
"contao-manager-plugin": "Sioweb\\LinkedElementBundle\\ContaoManager\\Plugin"
"name": "sioweb/linkedelement",
"type": "contao-bundle",
"description": "LinkedElement for Contao 4",
"license": "MIT",
"authors": [
{
"name": "Sascha Weidner",
"email": "support@sioweb.de"
}
],
"require": {
"php": "^8.1",
"contao/core-bundle": "^4.13 || ^5.0"
},
"autoload": {
"psr-4": {
"Sioweb\\LinkedElementBundle\\": "src/"
},
"classmap": [
"contao/"
],
"exclude-from-classmap": [
"contao/config/",
"contao/dca/",
"contao/languages/",
"contao/templates/"
]
},
"extra": {
"contao-manager-plugin": "Sioweb\\LinkedElementBundle\\ContaoManager\\Plugin"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Contao Open Source CMS
*/

namespace Sioweb;
namespace contao\classes;
use Contao\Frontend;
use Contao\FrontendTemplate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

/*
* Contao Open Source CMS
Expand All @@ -10,8 +10,7 @@
* @version 3.1.0
* @package sioweb.contao.extensions.ce
* @copyright Sioweb, Sascha Weidner
*
*
*/


$GLOBALS['TL_HOOKS']['getContentElement'][] = array('Sioweb\LinkedElement', 'modifyElement');
$GLOBALS['TL_HOOKS']['getContentElement'][] = array('contao\classes\LinkedElement', 'modifyElement');
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

/*
* Contao Open Source CMS
Expand All @@ -10,7 +10,7 @@
* @version 3.1.0
* @package sioweb.contao.extensions.ce
* @copyright Sascha Weidner, Sioweb
*
*
*/


Expand All @@ -32,4 +32,4 @@
'sql' => "varchar(2048) NOT NULL default ''"
);

$GLOBALS['TL_DCA']['tl_content']['fields']['linkedElementTarget'] = $GLOBALS['TL_DCA']['tl_content']['fields']['target'];
$GLOBALS['TL_DCA']['tl_content']['fields']['linkedElementTarget'] = $GLOBALS['TL_DCA']['tl_content']['fields']['target'];
20 changes: 20 additions & 0 deletions contao/languages/de/tl_content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

/*
* Contao Open Source CMS
* Copyright (C) 2005-2012 Leo Feyer
*
*/

/**
* @file tl_content.php
* @author Sascha Weidner
* @version 3.1.0
* @package sioweb.contao.extensions.ce
* @copyright Sioweb, Sascha Weidner
*
*/

$GLOBALS['TL_LANG']['tl_content']['linkedElement'] = ['Element verlinken', 'Verlinkt das gesamte Element.'];
File renamed without changes.
4 changes: 0 additions & 4 deletions src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
*
* @author Sascha Weidner <https://www.sioweb.de>
*/

class Plugin implements BundlePluginInterface
{
/**
* {@inheritdoc}
*/
public function getBundles(ParserInterface $parser)
{
return [
Expand Down
18 changes: 0 additions & 18 deletions src/Resources/contao/languages/de/tl_content.php

This file was deleted.

10 changes: 8 additions & 2 deletions src/SiowebLinkedElementBundle.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

declare(strict_types=1);

namespace Sioweb\LinkedElementBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* Configures the Contao LinkedElement bundle.
Expand All @@ -11,4 +13,8 @@
*/
class SiowebLinkedElementBundle extends Bundle
{
}
public function getPath(): string
{
return \dirname(__DIR__);
}
}

0 comments on commit 1929e35

Please sign in to comment.