Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

$saveHistory = ComponentHelper::getParams($component)->get('save_history', 0);

$fields = $displayData->get('fields') ?: [
$fields = $displayData->fields ?? [
['parent', 'parent_id'],
['published', 'state', 'enabled'],
['category', 'catid'],
Expand All @@ -39,7 +39,7 @@
'version_note',
];

$hiddenFields = $displayData->get('hidden_fields') ?: [];
$hiddenFields = $displayData->hidden_fields ?? [];

if (!$saveHistory) {
$hiddenFields[] = 'version_note';
Expand Down
2 changes: 1 addition & 1 deletion components/com_contact/src/View/Categories/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ class HtmlView extends CategoriesView
* @var string The name of the extension for the category
* @since 3.2
*/
protected $extension = 'com_contact';
public $extension = 'com_contact';
}
2 changes: 1 addition & 1 deletion components/com_content/src/View/Categories/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ class HtmlView extends CategoriesView
* @var string The name of the extension for the category
* @since 3.2
*/
protected $extension = 'com_content';
public $extension = 'com_content';
}
2 changes: 1 addition & 1 deletion components/com_newsfeeds/src/View/Categories/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ class HtmlView extends CategoriesView
* @var string The name of the extension for the category
* @since 3.2
*/
protected $extension = 'com_newsfeeds';
public $extension = 'com_newsfeeds';
}
2 changes: 1 addition & 1 deletion layouts/joomla/content/categories_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<?php // If there is a description in the menu parameters use that; ?>
<?php if ($displayData->params->get('categories_description')) : ?>
<div class="category-desc base-desc">
<?php echo HTMLHelper::_('content.prepare', $displayData->params->get('categories_description'), '', $displayData->get('extension') . '.categories'); ?>
<?php echo HTMLHelper::_('content.prepare', $displayData->params->get('categories_description'), '', $displayData->extension . '.categories'); ?>
</div>
<?php else : ?>
<?php // Otherwise get one from the database if it exists. ?>
Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/content/category_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* layout you need to close this div either by overriding this file or in your main layout.
*/
$params = $displayData->params;
$category = $displayData->get('category');
$category = $displayData->category;
$extension = $category->extension;
$canEdit = $params->get('access-edit');
$className = substr($extension, 4);
Expand Down Expand Up @@ -89,7 +89,7 @@
<?php endif; ?>
<?php echo $displayData->loadTemplate($displayData->subtemplatename); ?>

<?php if ($displayData->maxLevel != 0 && $displayData->get('children')) : ?>
<?php if ($displayData->maxLevel != 0 && $displayData->children) : ?>
<div class="cat-children">
<?php if ($params->get('show_category_heading_title_text', 1) == 1) : ?>
<h3>
Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/edit/admin_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$form = $displayData->getForm();
$input = $app->getInput();

$fields = $displayData->get('fields') ?: [
$fields = $displayData->fields ?? [
['parent', 'parent_id'],
['published', 'state', 'enabled'],
['category', 'catid'],
Expand All @@ -30,7 +30,7 @@
'version_note',
];

$hiddenFields = $displayData->get('hidden_fields') ?: [];
$hiddenFields = $displayData->hidden_fields ?? [];

if (!ModuleHelper::isAdminMultilang()) {
$hiddenFields[] = 'language';
Expand Down
8 changes: 4 additions & 4 deletions layouts/joomla/edit/fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
$app = Factory::getApplication();
$form = $displayData->getForm();

$name = $displayData->get('fieldset');
$name = $displayData->fieldset;
$fieldSet = $form->getFieldset($name);

if (empty($fieldSet)) {
return;
}

$ignoreFields = $displayData->get('ignore_fields') ? : [];
$extraFields = $displayData->get('extra_fields') ? : [];
$ignoreFields = $displayData->ignore_fields ?? [];
$extraFields = $displayData->extra_fields ?? [];

if (!empty($displayData->showOptions) || $displayData->get('show_options', 1)) {
if (!empty($displayData->showOptions) || ($displayData->show_options ?? 1)) {
if (isset($extraFields[$name])) {
foreach ($extraFields[$name] as $f) {
if (in_array($f, $ignoreFields)) {
Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/edit/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$saveHistory = ComponentHelper::getParams($component)->get('save_history', 0);

$fields = $displayData->get('fields') ?: [
$fields = $displayData->fields ?? [
'transition',
['parent', 'parent_id'],
['published', 'state', 'enabled'],
Expand All @@ -42,7 +42,7 @@
'version_note',
];

$hiddenFields = $displayData->get('hidden_fields') ?: [];
$hiddenFields = $displayData->hidden_fields ?? [];

if (!$saveHistory) {
$hiddenFields[] = 'version_note';
Expand Down
20 changes: 10 additions & 10 deletions layouts/joomla/edit/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@
$app = Factory::getApplication();
$form = $displayData->getForm();
$fieldSets = $form->getFieldsets();
$helper = $displayData->get('useCoreUI', false) ? 'uitab' : 'bootstrap';
$helper = ($displayData->useCoreUI ?? false) ? 'uitab' : 'bootstrap';

if (empty($fieldSets)) {
return;
}

$ignoreFieldsets = $displayData->get('ignore_fieldsets') ?: [];
$outputFieldsets = $displayData->get('output_fieldsets') ?: [];
$ignoreFieldsetFields = $displayData->get('ignore_fieldset_fields') ?: [];
$ignoreFields = $displayData->get('ignore_fields') ?: [];
$extraFields = $displayData->get('extra_fields') ?: [];
$tabName = $displayData->get('tab_name') ?: 'myTab';
$ignoreFieldsets = $displayData->ignore_fieldsets ?? [];
$outputFieldsets = $displayData->output_fieldsets ?? [];
$ignoreFieldsetFields = $displayData->ignore_fieldset_fields ?? [];
$ignoreFields = $displayData->ignore_fields ?? [];
$extraFields = $displayData->extra_fields ?? [];
$tabName = $displayData->tab_name ?? 'myTab';

// These are required to preserve data on save when fields are not displayed.
$hiddenFieldsets = $displayData->get('hiddenFieldsets') ?: [];
$hiddenFieldsets = $displayData->hiddenFieldsets ?? [];

// These are required to configure showing and hiding fields in the editor.
$configFieldsets = $displayData->get('configFieldsets') ?: [];
$configFieldsets = $displayData->configFieldsets ?? [];

// Handle the hidden fieldsets when show_options is set false
if (!$displayData->get('show_options', 1)) {
if (!($displayData->show_options ?? 1)) {
// The HTML buffer
$html = [];

Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/edit/publishingdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

$form = $displayData->getForm();

$fields = $displayData->get('fields') ?: [
$fields = $displayData->fields ?? [
'publish_up',
'publish_down',
'featured_up',
Expand All @@ -27,7 +27,7 @@
'id'
];

$hiddenFields = $displayData->get('hidden_fields') ?: [];
$hiddenFields = $displayData->hidden_fields ?? [];

foreach ($fields as $field) {
foreach ((array) $field as $f) {
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/MVC/View/CategoryView.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CategoryView extends HtmlView
* @var CategoryNode
* @since 3.2
*/
protected $category;
public $category;

/**
* The list of other categories for this extension.
Expand All @@ -82,7 +82,7 @@ class CategoryView extends HtmlView
* @var array
* @since 3.2
*/
protected $children;
public $children;

/**
* The name of the extension for the category
Expand Down