| @@ 126-143 (lines=18) @@ | ||
| 123 | ), |
|
| 124 | "ContentReviewType" => array( |
|
| 125 | "title" => "Settings are", |
|
| 126 | "formatting" => function ($value, $item) use ($linkPath, $linkQuery) { |
|
| 127 | if ($item->ContentReviewType == "Inherit") { |
|
| 128 | $options = $item->getOptions(); |
|
| 129 | if ($options && $options instanceof SiteConfig) { |
|
| 130 | return "Inherited from <a href='admin/settings'>Settings</a>"; |
|
| 131 | } elseif ($options) { |
|
| 132 | return sprintf( |
|
| 133 | "Inherited from <a href='%s/%d?%s'>%s</a>", |
|
| 134 | $linkPath, |
|
| 135 | $options->ID, |
|
| 136 | $linkQuery, |
|
| 137 | $options->Title |
|
| 138 | ); |
|
| 139 | } |
|
| 140 | } |
|
| 141 | ||
| 142 | return $value; |
|
| 143 | } |
|
| 144 | ), |
|
| 145 | ); |
|
| 146 | ||
| @@ 80-97 (lines=18) @@ | ||
| 77 | ), |
|
| 78 | "ContentReviewType" => array( |
|
| 79 | "title" => "Settings are", |
|
| 80 | "formatting" => function ($value, $item) use ($linkPath, $linkQuery) { |
|
| 81 | if ($item->ContentReviewType == "Inherit") { |
|
| 82 | $options = $item->getOptions(); |
|
| 83 | if ($options && $options instanceof SiteConfig) { |
|
| 84 | return "Inherited from <a href='admin/settings'>Settings</a>"; |
|
| 85 | } elseif ($options) { |
|
| 86 | return sprintf( |
|
| 87 | "Inherited from <a href='%s/%d?%s'>%s</a>", |
|
| 88 | $linkPath, |
|
| 89 | $options->ID, |
|
| 90 | $linkQuery, |
|
| 91 | $options->Title |
|
| 92 | ); |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| 96 | return $value; |
|
| 97 | }, |
|
| 98 | ), |
|
| 99 | ); |
|
| 100 | ||