File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Framework \Api \AttributeValueFactory ;
11
11
12
12
/**
13
- * Class Document
13
+ * The document data provider
14
14
*/
15
15
class Document extends DataObject implements DocumentInterface
16
16
{
@@ -33,17 +33,23 @@ public function __construct(AttributeValueFactory $attributeValueFactory)
33
33
}
34
34
35
35
/**
36
+ * Gets ID.
37
+ *
36
38
* @return int|string
37
39
*/
38
40
public function getId ()
39
41
{
40
42
if (!$ this ->id ) {
41
- $ this ->id = $ this ->getData ($ this ->getIdFieldName ());
43
+ $ this ->id = $ this ->getIdFieldName () !== null
44
+ ? $ this ->getData ($ this ->getIdFieldName ())
45
+ : null ;
42
46
}
43
47
return $ this ->id ;
44
48
}
45
49
46
50
/**
51
+ * Sets ID.
52
+ *
47
53
* @param int $id
48
54
* @return void
49
55
*/
You can’t perform that action at this time.
0 commit comments