Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
2 | class CwpSiteTreeFileExtension extends DataExtension { |
||
3 | |||
4 | public function updateCMSFields(FieldList $fields) { |
||
5 | Requirements::css('cwp/css/fieldDescriptionToggle.css'); |
||
6 | Requirements::javascript('cwp/javascript/fieldDescriptionToggle.js'); |
||
7 | |||
8 | $fields->insertAfter( |
||
9 | ReadonlyField::create( |
||
10 | 'BackLinkCount', |
||
11 | _t('AssetTableField.BACKLINKCOUNT', 'Used on:'), |
||
12 | $this->owner->BackLinkTracking()->Count() . ' ' . _t('AssetTableField.PAGES', 'page(s)')) |
||
13 | ->addExtraClass('cms-description-toggle') |
||
14 | ->setDescription($this->BackLinkHTMLList()), |
||
15 | 'LastEdited' |
||
|
|||
16 | ); |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Generate an HTML list which provides links to where a file is used. |
||
21 | * |
||
22 | * @return String |
||
23 | */ |
||
24 | public function BackLinkHTMLList() { |
||
41 | } |
||
42 | |||
44 |