/webtrees/app/ |
H A D | MediaFile.php | 66 private Media $media; variable in Fisharebest\\Webtrees\\MediaFile 74 * @param Media $media 76 public function __construct(string $gedcom, Media $media) argument 78 $this->media = $media; 143 foreach ($this->media->facts() as $fact) { 157 foreach ($this->media->facts() as $fact) { 195 'alt' => strip_tags($this->media->fullName()), 202 'data-title' => strip_tags($this->media->fullName()), 245 'xref' => $this->media->xref(), 246 'tree' => $this->media->tree()->name(), [all …]
|
H A D | Auth.php | 338 * @param Media|null $media 345 public static function checkMediaAccess(Media|null $media, bool $edit = false): Media argument 349 if ($media === null) { 353 if ($edit && $media->canEdit()) { 354 $media->lock(); 356 return $media; 359 if ($media->canShow()) { 360 return $media;
|
/webtrees/app/Http/RequestHandlers/ |
H A D | ManageMediaData.php | 115 $media = Registry::mediaFactory()->make($row->m_id, $tree, $row->m_gedcom); 116 assert($media instanceof Media); 125 $this->mediaObjectInfo($media), 155 $this->mediaObjectInfo($media), 276 * @param Media $media 280 private function mediaObjectInfo(Media $media): string argument 283 …$html = '<a href="' . e($media->url()) . '" title="' . e($media->tree()->title()) . '">' . $med… 286 $html .= ' — ' . e($media->tree()->title()); 289 $html .= $element->value($media->getNote(), $media->tree()); 293 foreach ($this->linked_record_service->linkedIndividuals($media) as $link) { [all …]
|
H A D | ReorderMediaFilesPage.php | 47 $media = Registry::mediaFactory()->make($xref, $tree); 48 $media = Auth::checkMediaAccess($media, true); 49 $title = $media->fullName() . ' — ' . I18N::translate('Re-order media'); 51 if ($media->mediaFiles()->count() < 2) { 54 'xref' => $media->xref(), 59 'media' => $media,
|
H A D | ReorderMediaFilesAction.php | 51 $media = Registry::mediaFactory()->make($xref, $tree); 52 $media = Auth::checkMediaAccess($media, true); 54 $fake_facts = ['0 @' . $media->xref() . '@ OBJE']; 59 foreach ($media->facts() as $fact) { 74 $media->updateRecord($gedcom, false); 76 return redirect($media->url());
|
H A D | EditMediaFileAction.php | 80 $media = Registry::mediaFactory()->make($xref, $tree); 81 $media = Auth::checkMediaAccess($media, true); 87 $media_file = $media->mediaFiles() 115 $filesystem = $media->tree()->mediaFilesystem(); 141 $media->updateFact($fact_id, $gedcom, true); 145 $this->pending_changes_service->acceptRecord($media); 148 return redirect($media->url());
|
H A D | AddMediaFileAction.php | 65 $media = Registry::mediaFactory()->make($xref, $tree); 66 $media = Auth::checkMediaAccess($media, true); 78 return redirect($media->url()); 83 $media->createFact($gedcom, true); 86 $this->pending_changes_service->acceptRecord($media); 88 return redirect($media->url());
|
H A D | TomSelectMediaObject.php | 62 $media = Registry::mediaFactory()->make($query, $tree); 64 if ($media instanceof Media) { 65 $results = new Collection([$media]); 71 return $results->map(static fn (Media $media): array => [ 72 'text' => view('selects/media', ['media' => $media]), 73 'value' => $at . $media->xref() . $at,
|
H A D | FixLevel0MediaData.php | 113 $media = Registry::mediaFactory()->make($datum->m_id, $tree, $datum->m_gedcom); 125 if ($fact->target() === $media && !$fact->isPendingDeletion()) { 136 'media' => $media, 141 $media->displayImage(100, 100, 'contain', ['class' => 'img-thumbnail']), 142 '<a href="' . e($media->url()) . '">' . $media->fullName() . '</a>',
|
H A D | MediaFileThumbnail.php | 51 $media = Registry::mediaFactory()->make($xref, $tree); 53 if ($media === null) { 57 if (!$media->canShow()) { 61 foreach ($media->mediaFiles() as $media_file) { 69 $params['tree'] = $media_file->media()->tree()->name();
|
H A D | EditMediaFileModal.php | 64 $media = Registry::mediaFactory()->make($xref, $tree); 67 $media = Auth::checkMediaAccess($media); 75 foreach ($media->mediaFiles() as $media_file) { 82 'media' => $media,
|
H A D | LinkMediaToFamilyModal.php | 43 $media = Registry::mediaFactory()->make($xref, $tree); 44 $media = Auth::checkMediaAccess($media); 47 'media' => $media,
|
H A D | LinkMediaToSourceModal.php | 43 $media = Registry::mediaFactory()->make($xref, $tree); 44 $media = Auth::checkMediaAccess($media); 47 'media' => $media,
|
H A D | LinkMediaToIndividualModal.php | 43 $media = Registry::mediaFactory()->make($xref, $tree); 44 $media = Auth::checkMediaAccess($media); 47 'media' => $media,
|
H A D | LinkMediaToRecordAction.php | 45 $media = Registry::mediaFactory()->make($xref, $tree); 46 $media = Auth::checkMediaAccess($media); 53 return redirect($media->url());
|
H A D | MediaFileDownload.php | 54 $media = Registry::mediaFactory()->make($xref, $tree); 55 $media = Auth::checkMediaAccess($media); 57 foreach ($media->mediaFiles() as $media_file) {
|
H A D | AddMediaFileModal.php | 62 $media = Registry::mediaFactory()->make($xref, $tree); 65 $media = Auth::checkMediaAccess($media); 79 'media' => $media,
|
/webtrees/app/Module/ |
H A D | ClippingsCartModule.php | 583 $media = Registry::mediaFactory()->make($xref, $tree); 584 $media = Auth::checkMediaAccess($media); 585 $name = $media->fullName(); 595 'record' => $media, 605 $media = Registry::mediaFactory()->make($xref, $tree); 606 $media = Auth::checkMediaAccess($media); 608 $this->addMediaToCart($media); 610 return redirect($media->url()); 843 protected function addMediaToCart(Media $media): void argument 848 $tree = $media->tree()->name(); [all …]
|
H A D | SlideShowModule.php | 133 $media = Registry::mediaFactory()->make($row->m_id, $tree, $row->m_gedcom); 135 if ($media === null || !$media->canShow() || $media->firstImageFile() === null) { 139 foreach ($this->linked_record_service->linkedIndividuals($media) as $individual) { 145 … return str_contains($individual->gedcom(), "\n1 OBJE @" . $media->xref() . '@'); 148 … return str_contains($individual->gedcom(), "\n2 OBJE @" . $media->xref() . '@');
|
H A D | AlbumModule.php | 84 $media = new Collection(); 90 if (!$media->has($xref)) { 91 $media->put($xref, Registry::mediaFactory()->make($xref, $individual->tree())); 96 return $media->filter()->filter(Media::accessFilter());
|
/webtrees/app/Elements/ |
H A D | XrefMedia.php | 81 $media = Registry::mediaFactory()->make($match[1], $tree); 83 if ($media === null) { 87 $media_file = $media->mediaFiles()->first(); 94 $value = '<a href="' . e($media->url()) . '">' . $media->fullName() . '</a>';
|
/webtrees/resources/views/modules/lightbox/ |
H A D | tab.phtml | 14 <?php foreach ($media_list as $media) : ?> 16 <?php foreach ($media->mediaFiles() as $media_file) : ?> 20 <a href="<?= e($media->url()) ?>"> 21 <?= $media->fullName() ?>
|
/webtrees/resources/views/edit/ |
H A D | reorder-media-files.phtml | 19 …"<?= e(route(ReorderMediaFilesAction::class, ['tree' => $media->tree()->name(), 'xref' => $media->… 21 <?php foreach ($media->mediaFiles() as $media_file) : ?> 42 <a class="btn btn-secondary" href="<?= e($media->url()) ?>">
|
/webtrees/resources/views/modules/random_media/ |
H A D | slide-show.phtml | 50 <a href="<?= e($media->url()) ?>"> 51 <b><?= $media->fullName() ?></b> 57 <?php foreach ($media->facts(['NOTE']) as $fact) : ?> 58 …<?= view('fact-gedcom-fields', ['gedcom' => $fact->gedcom(), 'parent' => $media->tag(), 'tree' => …
|
/webtrees/resources/views/components/ |
H A D | select-media.phtml | 33 <?php if (($media ?? null) instanceof Media) : ?> 34 <option value="<?= e($at . $media->xref() . $at) ?>"> 35 <?= view('selects/media', ['media' => $media]) ?>
|