Added PHP (script - before publish) & PHP (script - after publish)

with some fixes to the compiler
This commit is contained in:
2016-09-07 23:20:58 +02:00
parent f8d5145af9
commit b8311078ac
368 changed files with 3397 additions and 2947 deletions

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.18
@build 3rd September, 2016
@version 2.1.19
@build 7th September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.php
@ -112,7 +112,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVzcfields()
public function getVzefields()
{
// Get the user object.
$user = JFactory::getUser();
@ -196,13 +196,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
foreach ($items as $nr => &$item)
{
// convert datatype
$item->datatype = $this->selectionTranslationVzcfields($item->datatype, 'datatype');
$item->datatype = $this->selectionTranslationVzefields($item->datatype, 'datatype');
// convert indexes
$item->indexes = $this->selectionTranslationVzcfields($item->indexes, 'indexes');
$item->indexes = $this->selectionTranslationVzefields($item->indexes, 'indexes');
// convert null_switch
$item->null_switch = $this->selectionTranslationVzcfields($item->null_switch, 'null_switch');
$item->null_switch = $this->selectionTranslationVzefields($item->null_switch, 'null_switch');
// convert store
$item->store = $this->selectionTranslationVzcfields($item->store, 'store');
$item->store = $this->selectionTranslationVzefields($item->store, 'store');
}
}
@ -216,7 +216,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
*
* @return translatable string
*/
public function selectionTranslationVzcfields($value,$name)
public function selectionTranslationVzefields($value,$name)
{
// Array of datatype language strings
if ($name == 'datatype')
@ -603,6 +603,26 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.