File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
use Magento \Framework \Model \AbstractExtensibleModel ;
11
11
use Magento \MediaContentApi \Api \Data \ContentIdentityInterface ;
12
+ use Magento \MediaContentApi \Api \Data \ContentIdentityExtensionInterface ;
12
13
13
14
/**
14
15
* @inheritdoc
@@ -42,4 +43,20 @@ public function getField(): string
42
43
{
43
44
return (string ) $ this ->getData (self ::FIELD );
44
45
}
46
+
47
+ /**
48
+ * @inheritdoc
49
+ */
50
+ public function getExtensionAttributes (): ContentIdentityExtensionInterface
51
+ {
52
+ return $ this ->_getExtensionAttributes ();
53
+ }
54
+
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ public function setExtensionAttributes (ContentIdentityExtensionInterface $ extensionAttributes ): void
59
+ {
60
+ $ this ->_setExtensionAttributes ($ extensionAttributes );
61
+ }
45
62
}
Original file line number Diff line number Diff line change 8
8
9
9
namespace Magento \MediaContentApi \Api \Data ;
10
10
11
+ use Magento \MediaContentApi \Api \Data \ContentIdentityExtensionInterface ;
12
+
11
13
/**
12
14
* Data interface representing the identificator of content. I.e. short description field of product entity with id 42
13
15
* @api
@@ -34,4 +36,19 @@ public function getEntityId(): string;
34
36
* @return string
35
37
*/
36
38
public function getField (): string ;
39
+
40
+ /**
41
+ * Retrieve existing extension attributes object or create a new one.
42
+ *
43
+ * @return \Magento\MediaContentApi\Api\Data\ContentIdentityExtensionInterface|null
44
+ */
45
+ public function getExtensionAttributes (): ContentIdentityExtensionInterface ;
46
+
47
+ /**
48
+ * Set extension attributes
49
+ *
50
+ * @param \Magento\MediaContentApi\Api\Data\ContentIdentityExtensionInterface $extensionAttributes
51
+ * @return void
52
+ */
53
+ public function setExtensionAttributes (ContentIdentityExtensionInterface $ extensionAttributes ): void ;
37
54
}
You can’t perform that action at this time.
0 commit comments