Project

General

Profile

Actions

Bug #78337

closed

AbstractCondition in TypoScript

Added by Loon Buster about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2016-10-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

hello.

..maybe i understand something wrong; but it don't work in all the ways i tested.


typoscript:

[myVendorName\myPackageName\TypoScript\ExampleCondition]
...
[global]

file-path:

typo3conf/ext/ext_key/Classes/TypoScript/ExampleCondition.php

ExampleCondition.php:

<?php    namespace myVendorName\myPackageName\TypoScript;

class ExampleCondition extends \TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractCondition {

        /**
         * @param array $conditionParameters
         * @return bool
         */
        public function matchCondition(array $conditionParameters){

        return TRUE;

        }
}

have i made a mistake or is it a bug?

.loon

Actions #1

Updated by Wouter Wolters about 8 years ago

  • Status changed from New to Needs Feedback

Hi, this example https://review.typo3.org/#/c/32763/1/Classes/TypoScript/ExampleCondition.php should work out of the box.

Can you please check your casing in your namespace. It should be UpperCamelCase written.

Actions #2

Updated by Loon Buster about 8 years ago

thanks for your answer. ..i knew this example.

namespace is also okay; all other works fine - just this AbstractCondition not. ..need the php an special directory?

Or is there maybe an issue with extensions-keys which include an underline?

typo3conf/ext/my_package/Classes/TypoScript/
namespace MyVendorName\MyPackage\TypoScript;

Actions #3

Updated by Wouter Wolters about 8 years ago

Underscore means an Uppercase letter again. That shouldn't be a problem

Can you check if the file is in the autoload files located at typo3temp/autoload/ ?

Actions #4

Updated by Alexander Opitz almost 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF