Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
D&T Internet GmbH
LEO4 Lehrgangsverwaltung
Commits
4ee6b451
Commit
4ee6b451
authored
Feb 14, 2020
by
Stefan Bublies
Browse files
Initial Upload
parent
695ed49f
Pipeline
#45
canceled with stages
Changes
48
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/CourseController.php
0 → 100644
View file @
4ee6b451
<?php
namespace
SchommerMedia\SmediaCourse\Controller
;
/***
*
* This file is part of the "Kurs" Extension for TYPO3 CMS.
*
*
* (c) Changes by Stefan Bublies@dt-internet.de, 2020
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2018
*
***/
use
TYPO3\CMS\Core\Page\PageRenderer
;
use
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
/**
* CourseController
*/
class
CourseController
extends
\
TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* Init
*
* @return void
*/
protected
function
initializeAction
()
{
parent
::
initializeAction
();
$siteRelPath
=
ExtensionManagementUtility
::
siteRelPath
(
$this
->
request
->
getControllerExtensionKey
());
$pageRenderer
=
GeneralUtility
::
makeInstance
(
PageRenderer
::
class
);
$pageRenderer
->
addCssFile
(
$siteRelPath
.
'Resources/Public/Stylesheets/style.min.css'
);
}
/**
* action list
*
* @return void
*/
public
function
listAction
()
{
$licence
=
$this
->
settings
[
'licenceNr'
];
$coursetyp
=
$this
->
settings
[
'courseTyp'
];
$design
=
$this
->
settings
[
'design'
];
$last5
=
$this
->
settings
[
'last5'
];
$urldesign
=
"&NOHEADER=J&t3plugin=J"
;
if
(
$design
==
1
)
{
$urldesign
.
=
"&TYPO3=J"
;
}
if
(
$last5
==
1
)
{
$urldesign
.
=
"&top5=J"
;
}
if
(
$coursetyp
!=
""
)
{
$url
=
"www.kurs-anmeldung.de/go.dll?Lic="
.
$licence
.
"&KursTyp="
.
$coursetyp
;
}
else
{
$url
=
"www.kurs-anmeldung.de/go.dll?Lic="
.
$licence
;
}
$url
=
$url
.
$urldesign
;
$ch
=
curl_init
(
$url
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$ch
,
CURLOPT_BINARYTRANSFER
,
true
);
$content
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
$this
->
view
->
assign
(
'course'
,
$content
);
}
}
Classes/Domain/Model/Course.php
0 → 100644
View file @
4ee6b451
<?php
namespace
SchommerMedia\SmediaCourse\Domain\Model
;
/***
*
* This file is part of the "Kurs" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2018
*
***/
/**
* Course
*/
class
Course
extends
\
TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
}
Configuration/ExtensionBuilder/settings.yaml
0 → 100644
View file @
4ee6b451
#
# Extension Builder settings for extension smedia_course
# generated 2018-06-28T07:24:00Z
#
# See http://www.yaml.org/spec/1.2/spec.html
#
---
########### Overwrite settings ###########
#
# These settings only apply, if the roundtrip feature of the extension builder
# is enabled in the extension manager
#
# Usage:
# nesting reflects the file structure
# a setting applies to a file or recursive to all files and subfolders
#
# merge:
# means for classes: All properties ,methods and method bodies
# of the existing class will be modified according to the new settings
# but not overwritten
#
# for locallang xlf files: Existing keys and labels are always
# preserved (renaming a property or DomainObject will result in new keys and new labels)
#
# for other files: You will find a Split token at the end of the file
# see: \EBT\ExtensionBuilder\Service\RoundTrip::SPLIT_TOKEN
#
# After this token you can write whatever you want and it will be appended
# everytime the code is generated
#
# keep:
# files are never overwritten
# These settings may break the functionality of the extension builder!
# Handle with care!
#
#
############ extension settings ##############
overwriteSettings
:
Classes
:
Controller
:
merge
Domain
:
Model
:
merge
Repository
:
merge
Configuration
:
#TCA merge not possible - use overrides directory
#TypoScript: keep
Resources
:
Private
:
#Language: merge
#Templates: keep
ext_icon.gif
:
keep
# ext_localconf.php: merge
# ext_tables.php: merge
# ext_tables.sql: merge
## use static date attribute in xliff files ##
#staticDateInXliffFiles: 2018-06-28T07:24:00Z
## skip docComment (license header) ##
#skipDocComment
## list of error codes for warnings that should be ignored ##
#ignoreWarnings:
#503
######### settings for classBuilder #############################
#
# here you may define default parent classes for your classes
# these settings only apply for new generated classes
# you may also just change the parent class in the generated class file.
# It will be kept on next code generation, if the overwrite settings
# are configured to merge it
#
#################################################################
classBuilder
:
Controller
:
parentClass
:
\TYPO3\CMS\Extbase\Mvc\Controller\ActionController
Model
:
AbstractEntity
:
parentClass
:
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity
AbstractValueObject
:
parentClass
:
\TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
Repository
:
parentClass
:
\TYPO3\CMS\Extbase\Persistence\Repository
setDefaultValuesForClassProperties
:
true
\ No newline at end of file
Configuration/FlexForm/flexform.xml
0 → 100644
View file @
4ee6b451
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<sheets>
<general>
<ROOT>
<TCEforms>
<sheetTitle>
Allgemeine Einstellungen
</sheetTitle>
</TCEforms>
<type>
array
</type>
<el>
<settings.licenceNr>
<TCEforms>
<label>
Lizenznummer (Hilfe-Informationen finden Sie mit einem Klick hier)
</label>
<config>
<type>
input
</type>
<size>
6
</size>
<eval>
required
</eval>
</config>
</TCEforms>
</settings.licenceNr>
<settings.courseTyp>
<TCEforms>
<label>
Lehrgangstyp (Hilfe-Informationen finden Sie mit einem Klick hier)
</label>
<config>
<type>
input
</type>
<size>
6
</size>
</config>
</TCEforms>
</settings.courseTyp>
<settings.design>
<TCEforms>
<label>
DRK-Typo3-Design
</label>
<config>
<type>
select
</type>
<items
type=
"array"
>
<numIndex
index=
"0"
type=
"array"
>
<numIndex
index=
"0"
>
Ja
</numIndex>
<numIndex
index=
"1"
>
1
</numIndex>
</numIndex>
<numIndex
index=
"1"
type=
"array"
>
<numIndex
index=
"0"
>
Nein
</numIndex>
<numIndex
index=
"1"
>
0
</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</settings.design>
<settings.last5>
<TCEforms>
<label>
Nächsten 5 verf.Kurse
</label>
<config>
<type>
select
</type>
<items
type=
"array"
>
<numIndex
index=
"0"
type=
"array"
>
<numIndex
index=
"0"
>
Ja
</numIndex>
<numIndex
index=
"1"
>
1
</numIndex>
</numIndex>
<numIndex
index=
"1"
type=
"array"
>
<numIndex
index=
"0"
>
Nein
</numIndex>
<numIndex
index=
"1"
>
0
</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</settings.last5>
</el>
</ROOT>
</general>
</sheets>
</T3DataStructure>
Configuration/TCA/tx_smediacourse_domain_model_course.php
0 → 100644
View file @
4ee6b451
<?php
return
[
'ctrl'
=>
[
'title'
=>
'LLL:EXT:smedia_course/Resources/Private/Language/locallang_db.xlf:tx_smediacourse_domain_model_course'
,
'label'
=>
'uid'
,
'tstamp'
=>
'tstamp'
,
'crdate'
=>
'crdate'
,
'cruser_id'
=>
'cruser_id'
,
'versioningWS'
=>
true
,
'languageField'
=>
'sys_language_uid'
,
'transOrigPointerField'
=>
'l10n_parent'
,
'transOrigDiffSourceField'
=>
'l10n_diffsource'
,
'delete'
=>
'deleted'
,
'enablecolumns'
=>
[
'disabled'
=>
'hidden'
,
'starttime'
=>
'starttime'
,
'endtime'
=>
'endtime'
,
],
'searchFields'
=>
''
,
'iconfile'
=>
'EXT:smedia_course/Resources/Public/Icons/tx_smediacourse_domain_model_course.gif'
],
'interface'
=>
[
'showRecordFieldList'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, '
,
],
'types'
=>
[
'1'
=>
[
'showitem'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, , --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'
],
],
'columns'
=>
[
'sys_language_uid'
=>
[
'exclude'
=>
true
,
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.language'
,
'config'
=>
[
'type'
=>
'select'
,
'renderType'
=>
'selectSingle'
,
'special'
=>
'languages'
,
'items'
=>
[
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages'
,
-
1
,
'flags-multiple'
]
],
'default'
=>
0
,
],
],
'l10n_parent'
=>
[
'displayCond'
=>
'FIELD:sys_language_uid:>:0'
,
'exclude'
=>
true
,
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent'
,
'config'
=>
[
'type'
=>
'select'
,
'renderType'
=>
'selectSingle'
,
'items'
=>
[
[
''
,
0
],
],
'foreign_table'
=>
'tx_smediacourse_domain_model_course'
,
'foreign_table_where'
=>
'AND tx_smediacourse_domain_model_course.pid=###CURRENT_PID### AND tx_smediacourse_domain_model_course.sys_language_uid IN (-1,0)'
,
],
],
'l10n_diffsource'
=>
[
'config'
=>
[
'type'
=>
'passthrough'
,
],
],
't3ver_label'
=>
[
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel'
,
'config'
=>
[
'type'
=>
'input'
,
'size'
=>
30
,
'max'
=>
255
,
],
],
'hidden'
=>
[
'exclude'
=>
true
,
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.hidden'
,
'config'
=>
[
'type'
=>
'check'
,
'items'
=>
[
'1'
=>
[
'0'
=>
'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
]
],
],
],
'starttime'
=>
[
'exclude'
=>
true
,
'l10n_mode'
=>
'mergeIfNotBlank'
,
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.starttime'
,
'config'
=>
[
'type'
=>
'input'
,
'size'
=>
13
,
'eval'
=>
'datetime'
,
'default'
=>
0
,
]
],
'endtime'
=>
[
'exclude'
=>
true
,
'l10n_mode'
=>
'mergeIfNotBlank'
,
'label'
=>
'LLL:EXT:lang/locallang_general.xlf:LGL.endtime'
,
'config'
=>
[
'type'
=>
'input'
,
'size'
=>
13
,
'eval'
=>
'datetime'
,
'default'
=>
0
,
'range'
=>
[
'upper'
=>
mktime
(
0
,
0
,
0
,
1
,
1
,
2038
)
]
],
],
],
];
Configuration/TypoScript/constants.typoscript
0 → 100644
View file @
4ee6b451
plugin.tx_smediacourse_pi1 {
view {
# cat=plugin.tx_smediacourse_pi1/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:smedia_course/Resources/Private/Templates/
# cat=plugin.tx_smediacourse_pi1/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:smedia_course/Resources/Private/Partials/
# cat=plugin.tx_smediacourse_pi1/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:smedia_course/Resources/Private/Layouts/
}
persistence {
# cat=plugin.tx_smediacourse_pi1//a; type=string; label=Default storage PID
storagePid =
}
}
Configuration/TypoScript/setup.typoscript
0 → 100644
View file @
4ee6b451
plugin.tx_smediacourse_pi1 {
view {
templateRootPaths.0 = EXT:smedia_course/Resources/Private/Templates/
templateRootPaths.1 = {$plugin.tx_smediacourse_pi1.view.templateRootPath}
partialRootPaths.0 = EXT:smedia_course/Resources/Private/Partials/
partialRootPaths.1 = {$plugin.tx_smediacourse_pi1.view.partialRootPath}
layoutRootPaths.0 = EXT:smedia_course/Resources/Private/Layouts/
layoutRootPaths.1 = {$plugin.tx_smediacourse_pi1.view.layoutRootPath}
}
persistence {
storagePid = {$plugin.tx_smediacourse_pi1.persistence.storagePid}
#recursive = 1
}
features {
#skipDefaultArguments = 1
}
mvc {
#callDefaultActionIfActionCantBeResolved = 1
}
}
plugin.tx_smediacourse._CSS_DEFAULT_STYLE (
textarea.f3-form-error {
background-color:#FF9F9F;
border: 1px #FF0000 solid;
}
input.f3-form-error {
background-color:#FF9F9F;
border: 1px #FF0000 solid;
}
.tx-smedia-course table {
border-collapse:separate;
border-spacing:10px;
}
.tx-smedia-course table th {
font-weight:bold;
}
.tx-smedia-course table td {
vertical-align:top;
}
.typo3-messages .message-error {
color:red;
}
.typo3-messages .message-ok {
color:green;
}
)
Documentation.tmpl/Administrator/Index.rst
0 → 100644
View file @
4ee6b451
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _admin-manual:
Administrator Manual
====================
Target group: **Administrators**
Describes how to manage the extension from an administrator point of view.
That relates to Page/User TSconfig, permissions, configuration etc.,
which administrator level users have access to.
Language should be non / semi-technical, explaining, using small examples.
.. _admin-installation:
Installation
------------
- How should the extension be installed?
- Are they dependencies to resolve?
- Is it a static template file to be included?
To install the extension, perform the following steps:
#. Go to the Extension Manager
#. Install the extension
#. Load the static template
#. ...
For a list of configuration options, using a definition list is recommended:
Some Configuration
This option enables...
Other configuration
This other option is for all the rest...
.. figure:: ../Images/AdministratorManual/ExtensionManager.png
:alt: Extension Manager
Extension Manager (caption of the image)
List of extensions within the Extension Manager also shorten with "EM" (legend of the image)
.. _admin-configuration:
Configuration
-------------
* Where and how the extension should be configured? TypoScript? PHP?
* Are there other prerequisite to full fill beforehand?
For example, configure a setting in a special way somewhere.
.. _admin-faq:
FAQ
---
Possible subsection: FAQ
Subsection
^^^^^^^^^^
Some subsection
Sub-subsection
""""""""""""""
Deeper into the structure...
Documentation.tmpl/ChangeLog/Index.rst
0 → 100644
View file @
4ee6b451
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _changelog:
ChangeLog
=========
Providing a change log chapter is optional. You can also refer
users to the ChangeLog file inside the extension or to some repository's
commit listing.
Documentation.tmpl/Configuration/Index.rst
0 → 100644
View file @
4ee6b451
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _configuration:
Configuration Reference
=======================
Technical information: Installation, Reference of TypoScript options,
configuration options on system level, how to extend it, the technical
details, how to debug it and so on.
Language should be technical, assuming developer knowledge of TYPO3.
Small examples/visuals are always encouraged.
Target group: **Developers**
.. _configuration-typoscript:
TypoScript Reference
--------------------
Possible subsections: Reference of TypoScript options.
The construct below show the recommended structure for
TypoScript properties listing and description.
Properties should be listed in the order in which they
are executed by your extension, but the first should be
alphabetical for easier access.
When detailing data types or standard TypoScript
features, don't hesitate to cross-link to the TypoScript
Reference as shown below. See the :file:`Settings.yml`
file for the declaration of cross-linking keys.
Properties
^^^^^^^^^^
.. container:: ts-properties
=========================== ===================================== ======================= ====================
Property Data type :ref:`t3tsref:stdwrap` Default
=========================== ===================================== ======================= ====================
allWrap_ :ref:`t3tsref:data-type-wrap` yes :code:`<div>|</div>`