X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fmedia%2Ftests%2Fmodules%2Fmedia_test_source%2Fsrc%2FPlugin%2Fmedia%2FSource%2FTestWithHiddenSourceField.php;fp=web%2Fcore%2Fmodules%2Fmedia%2Ftests%2Fmodules%2Fmedia_test_source%2Fsrc%2FPlugin%2Fmedia%2FSource%2FTestWithHiddenSourceField.php;h=e5ac525eb0e6e839925a97703e74b38e560459bf;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0000000000000000000000000000000000000000;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/web/core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithHiddenSourceField.php b/web/core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithHiddenSourceField.php new file mode 100644 index 000000000..e5ac525eb --- /dev/null +++ b/web/core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithHiddenSourceField.php @@ -0,0 +1,42 @@ +removeComponent($this->getSourceFieldDefinition($type)->getName()); + } + + /** + * {@inheritdoc} + */ + public function prepareFormDisplay(MediaTypeInterface $type, EntityFormDisplayInterface $display) { + $display->removeComponent($this->getSourceFieldDefinition($type)->getName()); + } + + /** + * {@inheritdoc} + */ + protected function getSourceFieldName() { + return 'field_media_hidden'; + } + +}