This module extends the Layout Paragraphs to include a publishing toggle button to allow for paragraphs to be published or unpublished.

Project link

https://www.drupal.org/project/layout_paragraphs_toggle_publish

Git instructions

git clone --branch '1.x' https://git.drupalcode.org/project/layout_paragraphs_toggle_publish.git

Comments

xaviemirmon created an issue. See original summary.

alanhdev’s picture

I've raised a minor issue https://www.drupal.org/project/layout_paragraphs_toggle_publish/issues/3... as the .idea folder appears in the repo and needs to be removed.

t-lo’s picture

Status: Needs review » Needs work

Initial code review:
In your class TogglePublish function getPublishStatusLink:

$published = !empty($entity) ? $entity->isPublished() : FALSE;

could be reduced to:
$published = !empty($entity) && $entity->isPublished();

Unused use statements in the module file:
use Drupal\Core\Link;
use Drupal\Core\Url;

avpaderno’s picture

Issue summary: View changes
Status: Needs work » Needs review

Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smother review.

To reviewers: Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.

Since the project is being used for this application, for the time this application is open, only the user who created the application can commit code.

avpaderno’s picture

Reviews are for reporting an incorrect use of the Drupal API, code that doesn't follow the coding standards, or code that isn't secure. We don't point out other issues, except in the case a PHP file is full of syntax errors, or contains code outside a class/function/method.

avpaderno’s picture

Status: Needs review » Reviewed & tested by the community
core_version_requirement: ^8 || ^9

core_version_requirement is recognized starting from Drupal 8.8.x, if I recall correctly. That means the line should be core_version_requirement: ^8.8 || ^9.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thank you to all the reviewers.

t-lo’s picture

Completed initial review.
No Licencing issues found, all code is custom.
No other modules with duplicated functionality.
Drupal code standards met, small code style points reported in comment #3

xaviemirmon’s picture

Thank you all for your feedback, I'll apply those changes now.

Status: Fixed » Closed (fixed)

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