Feature #15252
closed
tslib_pibase: incorporate the fh_library
Added by Franz Holzinger almost 19 years ago.
Updated over 13 years ago.
Description
The fh_library shall become obsolete.
There are 2 functions which are needed by every extension:
getSetupOrFFvalue which reads a flexform as well as the TypoScript setup. This is needed to get the code field from both depending if flexforms are activated or not. It is used already by tt_products and sr_feuser_register.
displayHelpPage is needed to display a help page.
These functions shall come into tslib_pibase.
(issue imported from #M1963)
Files
Hi,
can you please incorporate the functions, and attach a patch here - and the necessary documentation as openOffice file ready for pasting it into the appropriate core documents.
Thanks & greets, Sebastian
Hello Sebastian,
can you check the changes from the diff file, or is something missing?
Greetings,
Franz
some questions to pi_getSetupOrFFvalue:
1. why is the value strtoupper ed?
2. in the function comment you're talking about "values from the setup field" but in the function itself the value is called $code. that's confusing.
3. I can't see an advantage in adding a 20 lines function with a 30 lines comment when the same can be done in 2 lines (or 3 if the current value does have a default value option) f.e.:
$code = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'what_to_display', 'sDEF');
$this->config['code'] = $code ? $code : $this->cObj->stdWrap($this->conf['code'], $this->conf['code.']);
1. strtoupper is necessary because in the Setup someone will not care about the case. But to compare the code the same case is needed.
2. This function will in most cases be used to get the code, but it can be used to get any value. I can rename this to something else e.g. pi_getSetupOrFFvalue($value, $valueExt, $defaultValue,
3. This can be programmed in 3 lines of course, but it takes a while for each programmer to get this solution which is needed in every extension supporting flexforms as well as code fields.
Hello,
I have not got any answer to this for several months. In the meantime new functions have been added to the fh_library. Please take a look into the TER. I do not want to repost a new patch all the time.
How shall I proceed now with the fh_library in the future?
I am currently developing on several extensions who will need these functions, too.
Regards,
Franz Holzinger
Sadly there is currently little interest in enhancing the FE API within the Core team.
I suggest you continue to use your libraray for now and join the extension coordination team.
It's my opinion that pi_base sucks. The API is a mess. So I'd like to see a whole new and clear plugin framework. But others may disagree.
But I would need at least the functions pi_getSetupOrFFvalue, pi_displayHelpPage and sL.
These are needed in the extensions tt_products, sr_feuser_register, tt_guest and tt_board.
It would be bad to wait so long for another extension library.
At the moment all of the fh_library functions have been put into the div (div2007) extension. Now the question arises again, if the development of the div extension should continue or the code put somewhere else.
Franz. I think the methods are fine in the "div" extension. All new extensions should rather use Extbase/Fluid than pibase anyway. I think you can close this issue now.
pi_base is not recommended any more.
Users shall use the extension div2007.
Can anybody transfer the extension keys 'lib' and 'div' to me? (Elmar Hinz is not working on them any more - see Extension Coordination Team list)
- Target version deleted (
0)
- TYPO3 Version changed from 3.9-dev to 4.5
- PHP Version deleted (
4)
IMO this can be closed, right?
- Status changed from New to Closed
Also available in: Atom
PDF