";
$body .= PHP_EOL . " \$item): ?>";
$body .= PHP_EOL . $this->_t(1) . "_t(2) . "\$canCheckin = \$user->authorise('core.manage', 'com_checkin') || \$item->checked_out == \$user->id || \$item->checked_out == 0;";
- $body .= PHP_EOL . $this->_t(2) . "\$userChkOut = JFactory::getUser(\$item->checked_out);";
- $body .= PHP_EOL . $this->_t(2) . "\$canDo = " . $Helper . "::getActions('" . $viewName_single . "',\$item,'" . $viewName_list . "');";
+ $body .= PHP_EOL . $this->_t(2)
+ . "\$canCheckin = \$user->authorise('core.manage', 'com_checkin') || \$item->checked_out == \$user->id || \$item->checked_out == 0;";
+ $body .= PHP_EOL . $this->_t(2)
+ . "\$userChkOut = JFactory::getUser(\$item->checked_out);";
+ $body .= PHP_EOL . $this->_t(2) . "\$canDo = " . $Helper
+ . "::getActions('" . $viewName_single . "',\$item,'"
+ . $viewName_list . "');";
$body .= PHP_EOL . $this->_t(1) . "?>";
$body .= PHP_EOL . $this->_t(1) . '';
// check if this view has fields that should not be escaped
@@ -8702,12 +13116,19 @@ class Interpretation extends Fields
// set some defaults
$customAdminViewButtons = '';
// set the item row
- $itemRow = $this->getListItemBuilder($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, '$displayData->escape', '$user', $refview);
+ $itemRow = $this->getListItemBuilder(
+ $item, $viewName_single, $viewName_list, $itemClass,
+ $doNotEscape, $coreLoad, $core, false, $ref,
+ '$displayData->escape', '$user', $refview
+ );
// check if buttons was aready added
if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
{
// get custom admin view buttons
- $customAdminViewButtons = $this->getCustomAdminViewButtons($viewName_list, $ref);
+ $customAdminViewButtons
+ = $this->getCustomAdminViewButtons(
+ $viewName_list, $ref
+ );
// make sure the custom admin view buttons are only added once
$firstTimeBeingAdded = false;
}
@@ -8720,39 +13141,61 @@ class Interpretation extends Fields
$counter++;
}
}
- $counter = $counter + 2;
- $data_value = (3 == $this->footableVersion) ? 'data-sort-value' : 'data-value';
+ $counter = $counter + 2;
+ $data_value = (3 == $this->footableVersion) ? 'data-sort-value'
+ : 'data-value';
// add the defaults
- $body .= PHP_EOL . $this->_t(2) . "published == 1):?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4) . 'langPrefix . "_PUBLISHED'" . '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_PUBLISHED'" . '); ?>';
+ $body .= PHP_EOL . $this->_t(2)
+ . "published == 1):?>";
+ $body .= PHP_EOL . $this->_t(3) . ' | ';
+ $body .= PHP_EOL . $this->_t(4)
+ . 'langPrefix . "_PUBLISHED'" . '); ?>">';
+ $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_PUBLISHED'" . '); ?>';
$body .= PHP_EOL . $this->_t(4) . '';
$body .= PHP_EOL . $this->_t(3) . ' | ';
- $body .= PHP_EOL . $this->_t(2) . "published == 0):?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4) . 'langPrefix . "_INACTIVE'" . '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_INACTIVE'" . '); ?>';
+ $body .= PHP_EOL . $this->_t(2)
+ . "published == 0):?>";
+ $body .= PHP_EOL . $this->_t(3) . ' | ';
+ $body .= PHP_EOL . $this->_t(4)
+ . 'langPrefix . "_INACTIVE'" . '); ?>">';
+ $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_INACTIVE'" . '); ?>';
$body .= PHP_EOL . $this->_t(4) . '';
$body .= PHP_EOL . $this->_t(3) . ' | ';
- $body .= PHP_EOL . $this->_t(2) . "published == 2):?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4) . 'langPrefix . "_ARCHIVED'" . '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_ARCHIVED'" . '); ?>';
+ $body .= PHP_EOL . $this->_t(2)
+ . "published == 2):?>";
+ $body .= PHP_EOL . $this->_t(3) . ' | ';
+ $body .= PHP_EOL . $this->_t(4)
+ . 'langPrefix . "_ARCHIVED'" . '); ?>">';
+ $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_ARCHIVED'" . '); ?>';
$body .= PHP_EOL . $this->_t(4) . '';
$body .= PHP_EOL . $this->_t(3) . ' | ';
- $body .= PHP_EOL . $this->_t(2) . "published == -2):?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4) . 'langPrefix . "_TRASHED'" . '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_TRASHED'" . '); ?>';
+ $body .= PHP_EOL . $this->_t(2)
+ . "published == -2):?>";
+ $body .= PHP_EOL . $this->_t(3) . ' | ';
+ $body .= PHP_EOL . $this->_t(4)
+ . 'langPrefix . "_TRASHED'" . '); ?>">';
+ $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_TRASHED'" . '); ?>';
$body .= PHP_EOL . $this->_t(4) . '';
$body .= PHP_EOL . $this->_t(3) . ' | ';
$body .= PHP_EOL . $this->_t(2) . '';
- $body .= PHP_EOL . $this->_t(2) . '';
+ $body .= PHP_EOL . $this->_t(2)
+ . ' | ';
$body .= PHP_EOL . $this->_t(3) . "id; ?>";
$body .= PHP_EOL . $this->_t(2) . " | ";
$body .= PHP_EOL . $this->_t(1) . "
";
@@ -8762,41 +13205,52 @@ class Interpretation extends Fields
{
$body .= PHP_EOL . '';
- $body .= PHP_EOL . $this->_t(2) . '';
+ $body .= PHP_EOL . $this->_t(1)
+ . '
';
+ $body .= PHP_EOL . $this->_t(2) . '';
$body .= PHP_EOL . $this->_t(1) . '
';
$body .= PHP_EOL . '';
+
// return the build
return $body;
}
+
return '';
}
/**
* set the list body table head linked admin view
*
- * @param string $viewName_single
- * @param string $viewName_list
- * @param bool $addNewButon
- * @param string $refview
+ * @param string $viewName_single
+ * @param string $viewName_list
+ * @param bool $addNewButon
+ * @param string $refview
*
* @return string
*/
- public function setListHeadLinked($viewName_single, $viewName_list, $addNewButon, $refview)
- {
- if (isset($this->listBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listBuilder[$viewName_list]))
+ public function setListHeadLinked($viewName_single, $viewName_list,
+ $addNewButon, $refview
+ ) {
+ if (isset($this->listBuilder[$viewName_list])
+ && ComponentbuilderHelper::checkArray(
+ $this->listBuilder[$viewName_list]
+ ))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper';
- $head = '';
+ $Helper = $this->fileContentStatic[$this->hhh . 'Component'
+ . $this->hhh] . 'Helper';
+ $head = '';
// only add new button if set
if ($addNewButon > 0)
{
@@ -8804,11 +13258,19 @@ class Interpretation extends Fields
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
{
- $core = $this->permissionCore[$viewName_single];
+ $core = $this->permissionCore[$viewName_single];
$coreLoad = true;
}
// check if the item has permissions.
- if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.create']]))
+ if ($coreLoad && isset($core['core.create'])
+ && isset($this->permissionBuilder['global'][$core['core.create']])
+ && ComponentbuilderHelper::checkArray(
+ $this->permissionBuilder['global'][$core['core.create']]
+ )
+ && in_array(
+ $viewName_single,
+ $this->permissionBuilder['global'][$core['core.create']]
+ ))
{
// set permissions.
$accessCheck = "\$can->get('" . $core['core.create'] . "')";
@@ -8830,12 +13292,20 @@ class Interpretation extends Fields
// add the new buttons
if ($addNewButon == 1 || $addNewButon == 2)
{
- $head .= PHP_EOL . $tabB . $this->_t(1) . '
langPrefix . "_NEW'" . '); ?>';
+ $head .= PHP_EOL . $tabB . $this->_t(1)
+ . '
langPrefix . "_NEW'"
+ . '); ?>';
}
// add the close and new button
if ($addNewButon == 2 || $addNewButon == 3)
{
- $head .= PHP_EOL . $tabB . $this->_t(1) . '
langPrefix . "_CLOSE_NEW'" . '); ?>';
+ $head .= PHP_EOL . $tabB . $this->_t(1)
+ . '
langPrefix . "_CLOSE_NEW'"
+ . '); ?>';
}
// close group button if needed
if ($addNewButon == 2)
@@ -8852,15 +13322,22 @@ class Interpretation extends Fields
// set the style for V2
$metro_blue = (2 == $this->footableVersion) ? ' metro-blue' : '';
// set the toggle for V3
- $toggle = (3 == $this->footableVersion) ? ' data-show-toggle="true" data-toggle-column="first"' : '';
+ $toggle = (3 == $this->footableVersion)
+ ? ' data-show-toggle="true" data-toggle-column="first"' : '';
// set paging
- $paging = (2 == $this->footableVersion) ? ' data-page-size="20" data-filter="#filter_' . $viewName_list . '"' : ' data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true"';
+ $paging = (2 == $this->footableVersion)
+ ? ' data-page-size="20" data-filter="#filter_' . $viewName_list
+ . '"'
+ : ' data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true"';
// add html fix for V3
- $htmlFix = (3 == $this->footableVersion) ? ' data-type="html" data-sort-use="text"' : '';
- $head .= PHP_EOL . '