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
module-directory
Model
Region.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Directory\Model
;
8
23
class
Region
extends
\Magento\Framework\Model\AbstractModel
24
{
28
protected
function
_construct
()
29
{
30
$this->
_init
(\
Magento
\Directory\Model\
ResourceModel
\Region::class);
31
}
32
40
public
function
getName
()
41
{
42
$name
= $this->
getData
(
'name'
);
43
if
(
$name
===
null
) {
44
$name
= $this->
getData
(
'default_name'
);
45
}
46
return
$name
;
47
}
48
56
public
function
loadByCode
(
$code
, $countryId)
57
{
58
if
(
$code
) {
59
$this->
_getResource
()->loadByCode($this,
$code
, $countryId);
60
}
61
return
$this;
62
}
63
71
public
function
loadByName
(
$name
, $countryId)
72
{
73
$this->
_getResource
()->loadByName($this,
$name
, $countryId);
74
return
$this;
75
}
76
}
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Directory\Model\Region\loadByCode
loadByCode($code, $countryId)
Definition:
Region.php:56
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
Magento\Framework\DataObject\getData
getData($key='', $index=null)
Definition:
DataObject.php:119
Magento\Directory\Model\Region\_construct
_construct()
Definition:
Region.php:28
Magento\Directory\Model\Region\loadByName
loadByName($name, $countryId)
Definition:
Region.php:71
Magento\Framework\Model\AbstractModel\_getResource
_getResource()
Definition:
AbstractModel.php:470
Magento
Magento\Directory\Model\Region\getName
getName()
Definition:
Region.php:40
$code
$code
Definition:
info.phtml:12
Magento\Framework\Model\AbstractModel\_init
_init($resourceModel)
Definition:
AbstractModel.php:213
Magento\Directory\Model
Magento\Directory\Model\Region
Definition:
Region.php:23
$name
if(!isset($_GET['name'])) $name
Definition:
log.php:14