Comments

e0ipso created an issue. See original summary.

wim leers’s picture

Issue summary: View changes

Updated issue summary to use nice d.o links.

e0ipso’s picture

Status: Active » Needs review
StatusFileSize
new570 bytes

I'm not going to be using \Drupal\file\Entity\File::getFileUri() because I want the uri with all the array(array('value' => …)).

Let me know if that is what you had in mind.

wim leers’s picture

I don't understand that.

+++ b/src/Plugin/FileDownloadUrl.php
@@ -0,0 +1,63 @@
+  protected function getUris() {
+    return $this->getEntity()->get('uri')->getValue();
+  }
+

Compare this with File::getFileUri():

  public function getFileUri() {
    return $this->get('uri')->value;
  }

Are you saying that getValue() returns ['value' => X], and ->value returns X? I thought they both returned the same?

  • e0ipso committed 8b24727 on 8.x-1.x
    Issue #2797823 by e0ipso: [CLEANUP] Indicate that the file URL is a...
e0ipso’s picture

Are you saying that getValue() returns ['value' => X], and ->value returns X? I thought they both returned the same?

Yes. That is what I observed.

I committed this before I forgot about this.

e0ipso’s picture

Status: Needs review » Fixed

This can probably be closed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.