Commit 269f03db authored by xjm's avatar xjm

Issue #2472147 by googletorp, anavarre, jaredsmith, bojanz: Standardize getter...

Issue #2472147 by googletorp, anavarre, jaredsmith, bojanz: Standardize getter docblocks in node module
parent a0164e04
......@@ -125,7 +125,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
}
/**
* Retrieves the list of available view modes for the current node.
* Gets the list of available view modes for the current node.
*
* @param EntityInterface $node
* The node being previewed.
......
......@@ -18,7 +18,7 @@
interface NodeInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
/**
* Returns the node type.
* Gets the node type.
*
* @return string
* The node type.
......@@ -26,7 +26,7 @@ interface NodeInterface extends ContentEntityInterface, EntityChangedInterface,
public function getType();
/**
* Returns the node title.
* Gets the node title.
*
* @return string
* Title of the node.
......@@ -45,7 +45,7 @@ public function getTitle();
public function setTitle($title);
/**
* Returns the node creation timestamp.
* Gets the node creation timestamp.
*
* @return int
* Creation timestamp of the node.
......@@ -123,7 +123,7 @@ public function isPublished();
public function setPublished($published);
/**
* Returns the node revision creation timestamp.
* Gets the node revision creation timestamp.
*
* @return int
* The UNIX timestamp of when this revision was created.
......@@ -142,7 +142,7 @@ public function getRevisionCreationTime();
public function setRevisionCreationTime($timestamp);
/**
* Returns the node revision author.
* Gets the node revision author.
*
* @return \Drupal\user\UserInterface
* The user entity for the revision author.
......
......@@ -20,9 +20,10 @@ class NodePermissions {
use UrlGeneratorTrait;
/**
* Returns an array of content permissions.
* Gets an array of content permissions.
*
* @return array
* The content permissions.
*/
public function contentPermissions() {
return array(
......@@ -34,9 +35,11 @@ public function contentPermissions() {
}
/**
* Returns an array of node type permissions.
* Gets an array of node type permissions.
*
* @return array
* The node type permissions.
* @see \Drupal\user\PermissionHandlerInterface::getPermissions()
*/
public function nodeTypePermissions() {
$perms = array();
......
......@@ -17,7 +17,7 @@
interface NodeStorageInterface extends EntityStorageInterface {
/**
* Returns a list of node revision IDs for a specific node.
* Gets a list of node revision IDs for a specific node.
*
* @param \Drupal\node\NodeInterface
* The node entity.
......@@ -28,7 +28,7 @@ interface NodeStorageInterface extends EntityStorageInterface {
public function revisionIds(NodeInterface $node);
/**
* Returns a list of revision IDs having a given user as node author.
* Gets a list of revision IDs having a given user as node author.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user entity.
......
......@@ -23,7 +23,7 @@ interface NodeTypeInterface extends ConfigEntityInterface {
public function isLocked();
/**
* Returns whether a new revision should be created by default.
* Gets whether a new revision should be created by default.
*
* @return bool
* TRUE if a new revision should be created by default.
......@@ -31,7 +31,7 @@ public function isLocked();
public function isNewRevision();
/**
* Set whether a new revision should be created by default.
* Sets whether a new revision should be created by default.
*
* @param bool $new_revision_
* TRUE if a new revision should be created by default.
......@@ -39,7 +39,7 @@ public function isNewRevision();
public function setNewRevision($new_revision);
/**
* Returns whether 'Submitted by' information should be shown.
* Gets whether 'Submitted by' information should be shown.
*
* @return bool
* TRUE if the submitted by information should be shown.
......@@ -47,7 +47,7 @@ public function setNewRevision($new_revision);
public function displaySubmitted();
/**
* Set whether 'Submitted by' information should be shown.
* Sets whether 'Submitted by' information should be shown.
*
* @param bool $display_submitted
* TRUE if the submitted by information should be shown.
......@@ -55,7 +55,7 @@ public function displaySubmitted();
public function setDisplaySubmitted($display_submtited);
/**
* Returns the preview mode.
* Gets the preview mode.
*
* @return int
* DRUPAL_DISABLED, DRUPAL_OPTIONAL or DRUPAL_REQUIRED.
......@@ -71,7 +71,7 @@ public function getPreviewMode();
public function setPreviewMode($preview_mode);
/**
* Returns the help information.
* Gets the help information.
*
* @return string
* The help information of this node type.
......@@ -79,7 +79,7 @@ public function setPreviewMode($preview_mode);
public function getHelp();
/**
* Returns the description.
* Gets the description.
*
* @return string
* The description of this node type.
......
......@@ -48,6 +48,8 @@ class Node extends WizardPluginBase {
* Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::getAvailableSorts().
*
* @return array
* An array whose keys are the available sort options and whose
* corresponding values are human readable labels.
*/
public function getAvailableSorts() {
// You can't execute functions in properties, so override the method
......
......@@ -190,9 +190,11 @@ function testNodeAddWithoutContentTypes () {
}
/**
* Returns log records with the rollback exception message.
* Gets the watchdog IDs of the records with the rollback exception message.
*
* @return array
* @return int[]
* Array containing the IDs of the log records with the rollback exception
* message.
*/
protected static function getWatchdogIdsForTestExceptionRollback() {
// PostgreSQL doesn't support bytea LIKE queries, so we need to unserialize
......@@ -209,9 +211,11 @@ protected static function getWatchdogIdsForTestExceptionRollback() {
}
/**
* Returns log records with the explicit rollback failed exception message.
* Gets the log records with the explicit rollback failed exception message.
*
* @return array
* @return \Drupal\Core\Database\StatementInterface
* A prepared statement object (already executed), which contains the log
* records with the explicit rollback failed exception message.
*/
protected static function getWatchdogIdsForFailedExplicitRollback() {
return db_query("SELECT wid FROM {watchdog} WHERE message LIKE 'Explicit rollback failed%'")->fetchAll();
......
......@@ -92,7 +92,7 @@ function assertNodeCreateAccess($bundle, $result, AccountInterface $account, $la
}
/**
* Constructs an assert message for checking node access.
* Constructs an assert message to display which node access was tested.
*
* @param string $operation
* The operation to check access for.
......@@ -103,6 +103,8 @@ function assertNodeCreateAccess($bundle, $result, AccountInterface $account, $la
* to check. If NULL, the untranslated (fallback) access is checked.
*
* @return string
* An assert message string which contains information in plain English
* about the node access permission test that was performed.
*/
function nodeAccessAssertMessage($operation, $result, $langcode = NULL) {
return format_string(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment