@@ -20,11 +20,11 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [ |
|
| 23 | + MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Script Tags', |
| 26 | 26 | 'handle' => ScriptService::GENERAL_HANDLE, |
| 27 | - 'class' => (string)MetaScriptContainer::class, |
|
| 27 | + 'class' => (string) MetaScriptContainer::class, |
|
| 28 | 28 | 'include' => true, |
| 29 | 29 | 'dependencies' => [ |
| 30 | 30 | ], |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | return [ |
| 24 | - MetaLinkContainer::CONTAINER_TYPE . LinkService::GENERAL_HANDLE => [ |
|
| 24 | + MetaLinkContainer::CONTAINER_TYPE.LinkService::GENERAL_HANDLE => [ |
|
| 25 | 25 | 'name' => 'General', |
| 26 | 26 | 'description' => 'Link Tags', |
| 27 | 27 | 'handle' => LinkService::GENERAL_HANDLE, |
| 28 | - 'class' => (string)MetaLinkContainer::class, |
|
| 28 | + 'class' => (string) MetaLinkContainer::class, |
|
| 29 | 29 | 'include' => true, |
| 30 | 30 | 'dependencies' => [ |
| 31 | 31 | ], |
@@ -20,11 +20,11 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [ |
|
| 23 | + MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Script Tags', |
| 26 | 26 | 'handle' => ScriptService::GENERAL_HANDLE, |
| 27 | - 'class' => (string)MetaScriptContainer::class, |
|
| 27 | + 'class' => (string) MetaScriptContainer::class, |
|
| 28 | 28 | 'include' => true, |
| 29 | 29 | 'dependencies' => [ |
| 30 | 30 | ], |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function getSummary(): string |
| 68 | 68 | { |
| 69 | - return Craft::$app->getView()->render($this->viewPath . 'summary', ['panel' => $this]); |
|
| 69 | + return Craft::$app->getView()->render($this->viewPath.'summary', ['panel' => $this]); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function getDetail(): string |
| 76 | 76 | { |
| 77 | - return Craft::$app->getView()->render($this->viewPath . 'detail', ['panel' => $this]); |
|
| 77 | + return Craft::$app->getView()->render($this->viewPath.'detail', ['panel' => $this]); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | $content .= $this->render('rendered-tags', [ |
| 165 | 165 | 'values' => [ |
| 166 | 166 | 'renderedTags' => $panel->data[$metaBundleCategory]['renderedTags'][$metaContainerName] ?? [], |
| 167 | - 'id' => $sectionName . '-' . $metaBundleCategory . '-' . $metaContainerName . '-rendered-tags', |
|
| 167 | + 'id' => $sectionName.'-'.$metaBundleCategory.'-'.$metaContainerName.'-rendered-tags', |
|
| 168 | 168 | 'view' => $this, |
| 169 | 169 | 'language' => $editorLanguage, |
| 170 | 170 | ], |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | 'seomatic' => [ |
| 41 | 41 | 'type' => SeomaticInterface::getType(), |
| 42 | 42 | 'args' => SeomaticArguments::getArguments(), |
| 43 | - 'resolve' => SeomaticResolver::class . '::resolve', |
|
| 43 | + 'resolve' => SeomaticResolver::class.'::resolve', |
|
| 44 | 44 | 'description' => 'This query is used to query for SEOmatic meta data.', |
| 45 | 45 | ], |
| 46 | 46 | ]; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $type = GqlEntityRegistry::createEntity(self::class, new InterfaceType([ |
| 80 | 80 | 'name' => static::getName(), |
| 81 | - 'fields' => self::class . '::getFieldDefinitions', |
|
| 81 | + 'fields' => self::class.'::getFieldDefinitions', |
|
| 82 | 82 | 'description' => 'This is the interface implemented by SEOmatic.', |
| 83 | 83 | 'resolveType' => function(array $value) { |
| 84 | 84 | return GqlEntityRegistry::getEntity(SeomaticGenerator::getName()); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $fields[$key] = [ |
| 108 | 108 | 'name' => $key, |
| 109 | 109 | 'type' => Type::string(), |
| 110 | - 'description' => 'The ' . $value . ' SEOmatic container.', |
|
| 110 | + 'description' => 'The '.$value.' SEOmatic container.', |
|
| 111 | 111 | ]; |
| 112 | 112 | if (isset(self::DEPRECATED_GRAPH_QL_FIELDS[$key])) { |
| 113 | 113 | $fields[$key]['deprecationReason'] = self::DEPRECATED_GRAPH_QL_FIELDS[$key]; |
@@ -118,27 +118,27 @@ discard block |
||
| 118 | 118 | 'name' => 'sitemaps', |
| 119 | 119 | 'args' => SitemapArguments::getArguments(), |
| 120 | 120 | 'type' => Type::listOf(FileContentsType::getType()), |
| 121 | - 'resolve' => SitemapResolver::class . '::getSitemaps', |
|
| 121 | + 'resolve' => SitemapResolver::class.'::getSitemaps', |
|
| 122 | 122 | ]; |
| 123 | 123 | |
| 124 | 124 | $fields['sitemapIndexes'] = [ |
| 125 | 125 | 'name' => 'sitemapIndexes', |
| 126 | 126 | 'args' => SitemapIndexArguments::getArguments(), |
| 127 | 127 | 'type' => Type::listOf(FileContentsType::getType()), |
| 128 | - 'resolve' => SitemapResolver::class . '::getSitemapIndexes', |
|
| 128 | + 'resolve' => SitemapResolver::class.'::getSitemapIndexes', |
|
| 129 | 129 | ]; |
| 130 | 130 | |
| 131 | 131 | $fields['sitemapStyles'] = [ |
| 132 | 132 | 'name' => 'sitemapStyles', |
| 133 | 133 | 'type' => FileContentsType::getType(), |
| 134 | - 'resolve' => SitemapResolver::class . '::getSitemapStyles', |
|
| 134 | + 'resolve' => SitemapResolver::class.'::getSitemapStyles', |
|
| 135 | 135 | ]; |
| 136 | 136 | |
| 137 | 137 | $fields['frontendTemplates'] = [ |
| 138 | 138 | 'name' => 'frontendTemplates', |
| 139 | 139 | 'args' => FrontendContainerArguments::getArguments(), |
| 140 | 140 | 'type' => Type::listOf(FileContentsType::getType()), |
| 141 | - 'resolve' => FrontendContainerResolver::class . '::getContainerFiles', |
|
| 141 | + 'resolve' => FrontendContainerResolver::class.'::getContainerFiles', |
|
| 142 | 142 | ]; |
| 143 | 143 | |
| 144 | 144 | return $fields; |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | string $sort = 'sourceName|asc', |
| 67 | 67 | int $page = 1, |
| 68 | 68 | int $per_page = 20, |
| 69 | - $filter = '', |
|
| 70 | - $siteId = 0 |
|
| 69 | + $filter = '', |
|
| 70 | + $siteId = 0 |
|
| 71 | 71 | ): Response { |
| 72 | 72 | $data = []; |
| 73 | 73 | $sortField = 'sourceName'; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // Query the db table |
| 100 | 100 | $offset = ($page - 1) * $per_page; |
| 101 | 101 | $currentSiteHandle = ''; |
| 102 | - if ((int)$siteId !== 0) { |
|
| 102 | + if ((int) $siteId !== 0) { |
|
| 103 | 103 | $site = Craft::$app->getSites()->getSiteById($siteId); |
| 104 | 104 | if ($site !== null) { |
| 105 | 105 | $currentSiteHandle = $site->handle; |
@@ -156,11 +156,11 @@ discard block |
||
| 156 | 156 | $numGrades = count(SettingsController::SETUP_GRADES); |
| 157 | 157 | $numFields = count(SettingsController::SEO_SETUP_FIELDS); |
| 158 | 158 | foreach (SettingsController::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 159 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 159 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 160 | 160 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
| 161 | 161 | $variables['contentSetupChecklist'][$setupField] = [ |
| 162 | 162 | 'label' => $setupLabel, |
| 163 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 163 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 164 | 164 | ]; |
| 165 | 165 | } |
| 166 | 166 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -601,8 +601,8 @@ |
||
| 601 | 601 | string $sourceBundleType, |
| 602 | 602 | string $sourceHandle, |
| 603 | 603 | string $siteHandle = null, |
| 604 | - $typeId = null, |
|
| 605 | - $loadFromSiteHandle = null |
|
| 604 | + $typeId = null, |
|
| 605 | + $loadFromSiteHandle = null |
|
| 606 | 606 | ): Response { |
| 607 | 607 | $variables = []; |
| 608 | 608 | // @TODO: Let people choose an entry/categorygroup/product as the preview |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
| 132 | 132 | $variables['title'] = $templateTitle; |
| 133 | 133 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
| 134 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 134 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 135 | 135 | $variables['crumbs'] = [ |
| 136 | 136 | [ |
| 137 | 137 | 'label' => $pluginName, |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | ], |
| 140 | 140 | [ |
| 141 | 141 | 'label' => $templateTitle, |
| 142 | - 'url' => UrlHelper::cpUrl('seomatic/dashboard' . $siteHandleUri), |
|
| 142 | + 'url' => UrlHelper::cpUrl('seomatic/dashboard'.$siteHandleUri), |
|
| 143 | 143 | ], |
| 144 | 144 | ]; |
| 145 | 145 | $variables['selectedSubnavItem'] = 'dashboard'; |
@@ -162,11 +162,11 @@ discard block |
||
| 162 | 162 | foreach ($variables['metaBundles'] as $metaBundle) { |
| 163 | 163 | $stat = 0; |
| 164 | 164 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 165 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 165 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 166 | 166 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
| 167 | 167 | $variables['contentSetupChecklist'][$setupField] = [ |
| 168 | 168 | 'label' => $setupLabel, |
| 169 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 169 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 170 | 170 | ]; |
| 171 | 171 | } |
| 172 | 172 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -177,16 +177,16 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | // Global SEO grades |
| 179 | 179 | Seomatic::$previewingMetaContainers = true; |
| 180 | - $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int)$siteId); |
|
| 180 | + $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle((int) $siteId); |
|
| 181 | 181 | Seomatic::$previewingMetaContainers = false; |
| 182 | 182 | if ($metaBundle !== null) { |
| 183 | 183 | $stat = 0; |
| 184 | 184 | $variables['globalSetupChecklist'] = []; |
| 185 | 185 | foreach (self::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 186 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 186 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 187 | 187 | $variables['globalSetupChecklist'][$setupField] = [ |
| 188 | 188 | 'label' => $setupLabel, |
| 189 | - 'value' => (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 189 | + 'value' => (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 190 | 190 | ]; |
| 191 | 191 | } |
| 192 | 192 | $stat = round(($stat / $numFields) * 100); |
@@ -196,17 +196,17 @@ discard block |
||
| 196 | 196 | $stat = 0; |
| 197 | 197 | $variables['siteSetupChecklist'] = []; |
| 198 | 198 | foreach (self::SITE_SETUP_FIELDS as $setupField => $setupLabel) { |
| 199 | - $stat += (int)!empty($metaBundle->metaSiteVars[$setupField]); |
|
| 199 | + $stat += (int) !empty($metaBundle->metaSiteVars[$setupField]); |
|
| 200 | 200 | $variables['siteSetupChecklist'][$setupField] = [ |
| 201 | 201 | 'label' => $setupLabel, |
| 202 | - 'value' => (int)!empty($metaBundle->metaSiteVars[$setupField]), |
|
| 202 | + 'value' => (int) !empty($metaBundle->metaSiteVars[$setupField]), |
|
| 203 | 203 | ]; |
| 204 | 204 | } |
| 205 | 205 | foreach (self::IDENTITY_SETUP_FIELDS as $setupField => $setupLabel) { |
| 206 | - $stat += (int)!empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
| 206 | + $stat += (int) !empty($metaBundle->metaSiteVars->identity[$setupField]); |
|
| 207 | 207 | $variables['siteSetupChecklist'][$setupField] = [ |
| 208 | 208 | 'label' => $setupLabel, |
| 209 | - 'value' => (int)!empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
| 209 | + 'value' => (int) !empty($metaBundle->metaSiteVars->identity[$setupField]), |
|
| 210 | 210 | ]; |
| 211 | 211 | } |
| 212 | 212 | $stat = round(($stat / $numFields) * 100); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $variables['title'] = $templateTitle; |
| 254 | 254 | $variables['subSectionTitle'] = $subSectionTitle; |
| 255 | 255 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 256 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 256 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 257 | 257 | $variables['crumbs'] = [ |
| 258 | 258 | [ |
| 259 | 259 | 'label' => $pluginName, |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | ], |
| 262 | 262 | [ |
| 263 | 263 | 'label' => $templateTitle, |
| 264 | - 'url' => UrlHelper::cpUrl('seomatic/global/general' . $siteHandleUri), |
|
| 264 | + 'url' => UrlHelper::cpUrl('seomatic/global/general'.$siteHandleUri), |
|
| 265 | 265 | ], |
| 266 | 266 | [ |
| 267 | 267 | 'label' => $subSectionTitle, |
| 268 | - 'url' => UrlHelper::cpUrl('seomatic/global/' . $subSection . $siteHandleUri), |
|
| 268 | + 'url' => UrlHelper::cpUrl('seomatic/global/'.$subSection.$siteHandleUri), |
|
| 269 | 269 | ], |
| 270 | 270 | ]; |
| 271 | 271 | $variables['selectedSubnavItem'] = 'global'; |
@@ -273,14 +273,14 @@ discard block |
||
| 273 | 273 | $this->setGlobalFieldSourceVariables($variables); |
| 274 | 274 | // Enabled sites |
| 275 | 275 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 276 | - $variables['controllerHandle'] = 'global' . '/' . $subSection; |
|
| 276 | + $variables['controllerHandle'] = 'global'.'/'.$subSection; |
|
| 277 | 277 | $variables['currentSubSection'] = $subSection; |
| 278 | 278 | // Meta bundle settings |
| 279 | 279 | Seomatic::$previewingMetaContainers = true; |
| 280 | 280 | // Get the site to copy the settings from, if any |
| 281 | 281 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 282 | 282 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 283 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 283 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 284 | 284 | // Load the metabundle |
| 285 | 285 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 286 | 286 | if ($editedMetaBundle) { |
@@ -334,11 +334,11 @@ discard block |
||
| 334 | 334 | // Preview the meta containers |
| 335 | 335 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
| 336 | 336 | MetaBundles::GLOBAL_META_BUNDLE, |
| 337 | - (int)$variables['currentSiteId'] |
|
| 337 | + (int) $variables['currentSiteId'] |
|
| 338 | 338 | ); |
| 339 | 339 | |
| 340 | 340 | // Render the template |
| 341 | - return $this->renderTemplate('seomatic/settings/global/' . $subSection, $variables); |
|
| 341 | + return $this->renderTemplate('seomatic/settings/global/'.$subSection, $variables); |
|
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | /** |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | $variables['pluginName'] = Seomatic::$settings->pluginName; |
| 470 | 470 | $variables['title'] = $templateTitle; |
| 471 | 471 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
| 472 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 472 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 473 | 473 | $variables['crumbs'] = [ |
| 474 | 474 | [ |
| 475 | 475 | 'label' => $pluginName, |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | ], |
| 478 | 478 | [ |
| 479 | 479 | 'label' => $templateTitle, |
| 480 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
| 480 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
| 481 | 481 | ], |
| 482 | 482 | ]; |
| 483 | 483 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | // Get the site to edit |
| 518 | 518 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
| 519 | 519 | if (is_string($typeId)) { |
| 520 | - $typeId = (int)$typeId; |
|
| 520 | + $typeId = (int) $typeId; |
|
| 521 | 521 | } |
| 522 | 522 | // Get the (entry) type menu |
| 523 | 523 | $typeMenu = []; |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | $currentType = reset($typeMenu); |
| 532 | 532 | $variables['currentType'] = $typeMenu[$typeId] ?? $currentType; |
| 533 | 533 | $variables['currentTypeId'] = $typeId ?? key($typeMenu); |
| 534 | - $typeId = (int)$variables['currentTypeId']; |
|
| 534 | + $typeId = (int) $variables['currentTypeId']; |
|
| 535 | 535 | } |
| 536 | 536 | $pluginName = Seomatic::$settings->pluginName; |
| 537 | 537 | // Asset bundle |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | // Get the site to copy the settings from, if any |
| 553 | 553 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 554 | 554 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 555 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 555 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 556 | 556 | // Load the metabundle |
| 557 | 557 | $metaBundle = Seomatic::$plugin->metaBundles->getMetaBundleBySourceHandle( |
| 558 | 558 | $sourceBundleType, |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | $variables['title'] = $templateTitle; |
| 579 | 579 | $variables['subSectionTitle'] = $subSectionTitle; |
| 580 | 580 | $variables['docTitle'] = "{$pluginName} - Content SEO - {$templateTitle} - {$subSectionTitle}"; |
| 581 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 581 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 582 | 582 | $variables['siteHandleUri'] = $siteHandleUri; |
| 583 | 583 | $variables['crumbs'] = [ |
| 584 | 584 | [ |
@@ -587,10 +587,10 @@ discard block |
||
| 587 | 587 | ], |
| 588 | 588 | [ |
| 589 | 589 | 'label' => 'Content SEO', |
| 590 | - 'url' => UrlHelper::cpUrl('seomatic/content' . $siteHandleUri), |
|
| 590 | + 'url' => UrlHelper::cpUrl('seomatic/content'.$siteHandleUri), |
|
| 591 | 591 | ], |
| 592 | 592 | [ |
| 593 | - 'label' => $metaBundle->sourceName . ' · ' . $subSectionTitle, |
|
| 593 | + 'label' => $metaBundle->sourceName.' · '.$subSectionTitle, |
|
| 594 | 594 | 'url' => UrlHelper::cpUrl("seomatic/edit-content/${subSection}/${sourceBundleType}/${sourceHandle}"), |
| 595 | 595 | ], |
| 596 | 596 | ]; |
@@ -620,13 +620,13 @@ discard block |
||
| 620 | 620 | // Preview the meta containers |
| 621 | 621 | Seomatic::$plugin->metaContainers->previewMetaContainers( |
| 622 | 622 | $uri, |
| 623 | - (int)$variables['currentSiteId'], |
|
| 623 | + (int) $variables['currentSiteId'], |
|
| 624 | 624 | false, |
| 625 | 625 | false |
| 626 | 626 | ); |
| 627 | 627 | |
| 628 | 628 | // Render the template |
| 629 | - return $this->renderTemplate('seomatic/settings/content/' . $subSection, $variables); |
|
| 629 | + return $this->renderTemplate('seomatic/settings/content/'.$subSection, $variables); |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | /** |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $bundleSettings = $request->getParam('metaBundleSettings'); |
| 647 | 647 | $sitemapSettings = $request->getParam('metaSitemapVars'); |
| 648 | 648 | if (is_string($typeId)) { |
| 649 | - $typeId = (int)$typeId; |
|
| 649 | + $typeId = (int) $typeId; |
|
| 650 | 650 | } |
| 651 | 651 | // Set the element type in the template |
| 652 | 652 | $elementName = ''; |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | if ($subSection === 'social') { |
| 712 | 712 | $subSectionSuffix = ' Media'; |
| 713 | 713 | } |
| 714 | - $subSectionTitle = Craft::t('seomatic', ucfirst($subSection) . $subSectionSuffix); |
|
| 714 | + $subSectionTitle = Craft::t('seomatic', ucfirst($subSection).$subSectionSuffix); |
|
| 715 | 715 | // Asset bundle |
| 716 | 716 | try { |
| 717 | 717 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $variables['title'] = $templateTitle; |
| 730 | 730 | $variables['subSectionTitle'] = $subSectionTitle; |
| 731 | 731 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 732 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 732 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 733 | 733 | $variables['crumbs'] = [ |
| 734 | 734 | [ |
| 735 | 735 | 'label' => $pluginName, |
@@ -737,11 +737,11 @@ discard block |
||
| 737 | 737 | ], |
| 738 | 738 | [ |
| 739 | 739 | 'label' => $templateTitle, |
| 740 | - 'url' => UrlHelper::cpUrl('seomatic/site/identity' . $siteHandleUri), |
|
| 740 | + 'url' => UrlHelper::cpUrl('seomatic/site/identity'.$siteHandleUri), |
|
| 741 | 741 | ], |
| 742 | 742 | [ |
| 743 | 743 | 'label' => $subSectionTitle, |
| 744 | - 'url' => UrlHelper::cpUrl('seomatic/site/' . $subSection . $siteHandleUri), |
|
| 744 | + 'url' => UrlHelper::cpUrl('seomatic/site/'.$subSection.$siteHandleUri), |
|
| 745 | 745 | ], |
| 746 | 746 | ]; |
| 747 | 747 | $variables['selectedSubnavItem'] = 'site'; |
@@ -749,14 +749,14 @@ discard block |
||
| 749 | 749 | |
| 750 | 750 | // Enabled sites |
| 751 | 751 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 752 | - $variables['controllerHandle'] = 'site' . '/' . $subSection; |
|
| 752 | + $variables['controllerHandle'] = 'site'.'/'.$subSection; |
|
| 753 | 753 | |
| 754 | 754 | // The site settings for the appropriate meta bundle |
| 755 | 755 | Seomatic::$previewingMetaContainers = true; |
| 756 | 756 | // Get the site to copy the settings from, if any |
| 757 | 757 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 758 | 758 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 759 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 759 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 760 | 760 | // Load the metabundle |
| 761 | 761 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 762 | 762 | Seomatic::$previewingMetaContainers = false; |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | $variables['elementType'] = Asset::class; |
| 775 | 775 | |
| 776 | 776 | // Render the template |
| 777 | - return $this->renderTemplate('seomatic/settings/site/' . $subSection, $variables); |
|
| 777 | + return $this->renderTemplate('seomatic/settings/site/'.$subSection, $variables); |
|
| 778 | 778 | } |
| 779 | 779 | |
| 780 | 780 | /** |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | $siteId = $this->getSiteIdFromHandle($siteHandle); |
| 906 | 906 | // Enabled sites |
| 907 | 907 | $this->setMultiSiteVariables($siteHandle, $siteId, $variables); |
| 908 | - $variables['controllerHandle'] = 'tracking' . '/' . $subSection; |
|
| 908 | + $variables['controllerHandle'] = 'tracking'.'/'.$subSection; |
|
| 909 | 909 | $variables['currentSubSection'] = $subSection; |
| 910 | 910 | |
| 911 | 911 | // The script meta containers for the global meta bundle |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | // Get the site to copy the settings from, if any |
| 914 | 914 | $variables['loadFromSiteHandle'] = $loadFromSiteHandle; |
| 915 | 915 | $loadFromSiteId = $this->getSiteIdFromHandle($loadFromSiteHandle); |
| 916 | - $siteIdToLoad = $loadFromSiteHandle === null ? (int)$variables['currentSiteId'] : $loadFromSiteId; |
|
| 916 | + $siteIdToLoad = $loadFromSiteHandle === null ? (int) $variables['currentSiteId'] : $loadFromSiteId; |
|
| 917 | 917 | // Load the metabundle |
| 918 | 918 | $metaBundle = Seomatic::$plugin->metaBundles->getGlobalMetaBundle($siteIdToLoad); |
| 919 | 919 | if ($editedMetaBundle) { |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | $variables['title'] = $templateTitle; |
| 954 | 954 | $variables['subSectionTitle'] = $subSectionTitle; |
| 955 | 955 | $variables['docTitle'] = "{$pluginName} - {$templateTitle} - {$subSectionTitle}"; |
| 956 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 956 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 957 | 957 | $variables['crumbs'] = [ |
| 958 | 958 | [ |
| 959 | 959 | 'label' => $pluginName, |
@@ -965,7 +965,7 @@ discard block |
||
| 965 | 965 | ], |
| 966 | 966 | [ |
| 967 | 967 | 'label' => $subSectionTitle, |
| 968 | - 'url' => UrlHelper::cpUrl('seomatic/tracking/' . $subSection . $siteHandleUri), |
|
| 968 | + 'url' => UrlHelper::cpUrl('seomatic/tracking/'.$subSection.$siteHandleUri), |
|
| 969 | 969 | ], |
| 970 | 970 | ]; |
| 971 | 971 | $variables['selectedSubnavItem'] = 'tracking'; |
@@ -1104,7 +1104,7 @@ discard block |
||
| 1104 | 1104 | if ($siteHandle !== null) { |
| 1105 | 1105 | $site = Craft::$app->getSites()->getSiteByHandle($siteHandle); |
| 1106 | 1106 | if (!$site) { |
| 1107 | - throw new NotFoundHttpException('Invalid site handle: ' . $siteHandle); |
|
| 1107 | + throw new NotFoundHttpException('Invalid site handle: '.$siteHandle); |
|
| 1108 | 1108 | } |
| 1109 | 1109 | $siteId = $site->id; |
| 1110 | 1110 | } else { |
@@ -1140,7 +1140,7 @@ discard block |
||
| 1140 | 1140 | if (!empty($variables['enabledSiteIds'])) { |
| 1141 | 1141 | $siteId = reset($variables['enabledSiteIds']); |
| 1142 | 1142 | } else { |
| 1143 | - $this->requirePermission('editSite:' . $siteId); |
|
| 1143 | + $this->requirePermission('editSite:'.$siteId); |
|
| 1144 | 1144 | } |
| 1145 | 1145 | } |
| 1146 | 1146 | } |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | if ($variables['showSites']) { |
| 1161 | 1161 | $variables['sitesMenuLabel'] = Craft::t( |
| 1162 | 1162 | 'site', |
| 1163 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
| 1163 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
| 1164 | 1164 | ); |
| 1165 | 1165 | } else { |
| 1166 | 1166 | $variables['sitesMenuLabel'] = ''; |
@@ -1225,7 +1225,7 @@ discard block |
||
| 1225 | 1225 | array &$variables |
| 1226 | 1226 | ) { |
| 1227 | 1227 | $variables['textFieldSources'] = array_merge( |
| 1228 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields'], 'title' => 'Title'], |
|
| 1228 | + ['entryGroup' => ['optgroup' => $groupName.' Fields'], 'title' => 'Title'], |
|
| 1229 | 1229 | FieldHelper::fieldsOfTypeFromSource( |
| 1230 | 1230 | $sourceBundleType, |
| 1231 | 1231 | $sourceHandle, |
@@ -1234,7 +1234,7 @@ discard block |
||
| 1234 | 1234 | ) |
| 1235 | 1235 | ); |
| 1236 | 1236 | $variables['assetFieldSources'] = array_merge( |
| 1237 | - ['entryGroup' => ['optgroup' => $groupName . ' Fields']], |
|
| 1237 | + ['entryGroup' => ['optgroup' => $groupName.' Fields']], |
|
| 1238 | 1238 | FieldHelper::fieldsOfTypeFromSource( |
| 1239 | 1239 | $sourceBundleType, |
| 1240 | 1240 | $sourceHandle, |