@@ 304-313 (lines=10) @@ | ||
301 | * @param File $record |
|
302 | * @return FormAction |
|
303 | */ |
|
304 | protected function getInsertAction($record) |
|
305 | { |
|
306 | $action = null; |
|
307 | if ($record && $record->isInDB() && $record->canEdit()) { |
|
308 | /** @var FormAction $action */ |
|
309 | $action = FormAction::create('insert', _t(__CLASS__.'.INSERT_FILE', 'Insert file')) |
|
310 | ->setSchemaData(['data' => ['buttonStyle' => 'primary']]); |
|
311 | } |
|
312 | return $action; |
|
313 | } |
|
314 | ||
315 | /** |
|
316 | * @param File $record |
|
@@ 319-328 (lines=10) @@ | ||
316 | * @param File $record |
|
317 | * @return FormAction |
|
318 | */ |
|
319 | protected function getInsertLinkAction($record) |
|
320 | { |
|
321 | $action = null; |
|
322 | if ($record && $record->isInDB() && $record->canEdit()) { |
|
323 | /** @var FormAction $action */ |
|
324 | $action = FormAction::create('insert', _t(__CLASS__.'.INSERT_LINK', 'Link to file')) |
|
325 | ->setSchemaData(['data' => ['buttonStyle' => 'primary']]); |
|
326 | } |
|
327 | return $action; |
|
328 | } |
|
329 | } |
|
330 |