-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #982 from creative-commoners/pulls/4.9/allow-empty…
…-preview Issue was solved
- Loading branch information
Showing
6 changed files
with
129 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace DNADesign\Elemental\Tests\Src; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\CMSPreviewable; | ||
|
||
class TestPreviewableDataObject extends TestDataObject implements TestOnly, CMSPreviewable | ||
{ | ||
private static $table_name = 'TestPreviewableDataObject'; | ||
|
||
public function PreviewLink($action = null) | ||
{ | ||
return 'preview-link'; | ||
} | ||
|
||
public function getMimeType() | ||
{ | ||
return null; | ||
} | ||
|
||
public function CMSEditLink() | ||
{ | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace DNADesign\Elemental\Tests\Src; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
|
||
class TestPreviewableDataObjectWithLink extends TestPreviewableDataObject implements TestOnly | ||
{ | ||
private static $table_name = 'TestPreviewableDataObjectWithLink'; | ||
|
||
public function Link($action = null) | ||
{ | ||
return 'base-link'; | ||
} | ||
} |