- protected function addMediaRoleAttributes(Fieldset $fieldset)
- {
- $fieldset->addField('roleLabel', 'note', ['text' => __('Role')]);
- $mediaRoles = $this->getProduct()->getMediaAttributes();
- ksort($mediaRoles);
- foreach ($mediaRoles as $mediaRole) {
- $fieldset->addField(
- 'video_' . $mediaRole->getAttributeCode(),
- 'checkbox',
- [
- 'class' => 'video_image_role',
- 'label' => __($mediaRole->getFrontendLabel()),
- 'title' => __($mediaRole->getFrontendLabel()),
- 'data-role' => 'role-type-selector',
- 'value' => $mediaRole->getAttributeCode(),
- ]
- );
- }
- return $this;
- }