Source of file MockEmbed.php
Size: 0,941 Bytes - Last Modified: 2021-12-23T10:27:34+00:00
/var/www/docs.ssmods.com/process/src/tests/php/Forms/RemoteFileFormFactoryTest/MockEmbed.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | <?php namespace SilverStripe\AssetAdmin\Tests\Forms\RemoteFileFormFactoryTest; use SilverStripe\Dev\TestOnly; use SilverStripe\View\Embed\Embeddable; class MockEmbed implements Embeddable, TestOnly { protected $url; public function __construct($url) { $this->url = $url; } public function getWidth() { return 100; } public function getHeight() { return 100; } public function getPreviewURL() { return $this->url; } /** * Get human readable name for this resource * * @return string */ public function getName() { return 'image'; } /** * Get Embed type * * @return string */ public function getType() { return 'image'; } /** * Validate this resource * * @return bool */ public function validate() { return true; } } |