Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Setup
Declaration
Schema
UpToDateDeclarativeSchema.php
Go to the documentation of this file.
1
<?php
7
declare(strict_types=1);
8
9
namespace
Magento\Framework\Setup\Declaration\Schema
;
10
11
use
Magento\Framework\Setup\Declaration\Schema\Diff\SchemaDiff
;
12
use
Magento\Framework\Setup\UpToDateValidatorInterface
;
13
17
class
UpToDateDeclarativeSchema
implements
UpToDateValidatorInterface
18
{
22
private
$schemaConfig;
23
27
private
$schemaDiff;
28
34
public
function
__construct
(
35
SchemaConfigInterface
$schemaConfig,
36
SchemaDiff
$schemaDiff
37
) {
38
$this->schemaConfig = $schemaConfig;
39
$this->schemaDiff = $schemaDiff;
40
}
41
45
public
function
getNotUpToDateMessage
() : string
46
{
47
return
'Declarative Schema is not up to date'
;
48
}
49
53
public
function
isUpToDate
() : bool
54
{
55
$declarativeSchema = $this->schemaConfig->getDeclarationConfig();
56
$dbSchema = $this->schemaConfig->getDbConfig();
57
$diff = $this->schemaDiff->diff($declarativeSchema, $dbSchema);
58
return
empty($diff->getAll());
59
}
60
}
Magento\Framework\Setup\Declaration\Schema\SchemaConfigInterface
Definition:
SchemaConfigInterface.php:18
Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema\getNotUpToDateMessage
getNotUpToDateMessage()
Definition:
UpToDateDeclarativeSchema.php:45
Magento\Framework\Setup\UpToDateValidatorInterface
Definition:
UpToDateValidatorInterface.php:21
Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema\__construct
__construct(SchemaConfigInterface $schemaConfig, SchemaDiff $schemaDiff)
Definition:
UpToDateDeclarativeSchema.php:34
Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema\isUpToDate
isUpToDate()
Definition:
UpToDateDeclarativeSchema.php:53
Magento\Framework\Setup\Declaration\Schema\Diff\SchemaDiff
Definition:
SchemaDiff.php:20
Magento\Framework\Setup\Declaration\Schema
Definition:
Comparator.php:7
Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema
Definition:
UpToDateDeclarativeSchema.php:17