Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a tab on each content entity to export the entry #10

Open
dawehner opened this issue Aug 29, 2014 · 5 comments
Open

Provide a tab on each content entity to export the entry #10

dawehner opened this issue Aug 29, 2014 · 5 comments

Comments

@dawehner
Copy link
Contributor

In order to use default_content you somehow need to export the content.

One way, as described in the readme, is to use some REST request.

An alternative way could be to provide a tab on each content entity:

Would you like to have such a feature inside default_content itself?
default_content

@Berdir
Copy link
Collaborator

Berdir commented Aug 29, 2014

Looks interesting. Wondering if it should be a local task or something else, maybe a drush command?

If we do this, we should then also apply the path changes (change every URL to drupal.org, so that it's not specific to your site), which is something you currently have to do manually.

@dawehner
Copy link
Contributor Author

The output itself is pretty straightforward, so it could be easily integrated into a drush command as well. I kinda see default_content as a site builder tools as well, so I ask myself whether having something like a UI would be useful as well.

    $entity = $this->entityManager->getStorage($entity_type)->load($entity_id);
    /** @var \Symfony\Component\Serializer\SerializerInterface $serializer */
    $serializer = $this->serializer;
    $output = $serializer->serialize($entity, 'hal_json', ['json_encode_options' => JSON_PRETTY_PRINT]);

Personally I would prefer to use the drush command, of cource :)

@andypost
Copy link
Collaborator

I think it makes sense to have a UI too, but better to place it somewhere in Development.
Implementation could use config single export alike

@larowlan
Copy link
Owner

Yes, pretty sure I had reference somewhere a todo to add this. Great idea

@dawehner
Copy link
Contributor Author

Yes, there is one in the readme

On Sun, Aug 31, 2014 at 11:31 PM, Lee Rowlands notifications@github.com
wrote:

Yes, pretty sure I had reference somewhere a todo to add this. Great idea


Reply to this email directly or view it on GitHub
#10 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants