model.create(someData)
.catch(function (err) {
console.error('ValidationError:', err.ValidationError);
console.error('Message:', err.message);
});
Outputs:
ValidationError: {
/** | |
* Collection Interface. | |
* | |
* Concrete implementations would exist INSIDE the boundary interfaces. | |
* | |
* - Must be able to add one or more entities to the collection. | |
* - Must be able to find entities in the collection. | |
* - Must be able update entities in the collection. | |
* - Must be able to remove entities from the collection. | |
* |
{ | |
"devDependencies": { | |
"app-root-path": "^1.0.0", | |
"jshint": "^2.7.0", | |
"mocha": "^2.2.5", | |
"supertest": "^1.0.1" | |
}, | |
"scripts": { | |
"check": "npm outdated", | |
"lint": "node_modules/.bin/jshint lib/ test/", |
model.create(someData)
.catch(function (err) {
console.error('ValidationError:', err.ValidationError);
console.error('Message:', err.message);
});
Outputs:
ValidationError: {
<?php | |
/** | |
* @package Joomla.Platform | |
* @subpackage Database | |
* | |
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE | |
*/ | |
defined('JPATH_PLATFORM') or die; |
/** | |
* Import a CSV file. | |
* | |
* @param string $fileName The name of the file to import. If omitted, the state is used. | |
* @param integer $offset The number of lines/rows to ignore (default = 0). | |
* | |
* @return void | |
* | |
* @since 1.0 | |
* @throws InvalidArgumentException if file name is invalid or does not exist. |
Version: 1 2012-05-??
This standard comprises the code style requirements for interoperability (Section 1) and the best practices guidelines (Section 2) for PHP projects.
studly-caps refers to a naming convention where all 'words' in the name are conactenated and have only the first letter in uppercase followed by lower case letters (for example "StudlyCaps").
<?php | |
class JVersionCompatibility | |
{ | |
/** | |
* Class constructor. | |
* | |
* @param SimpleXmlElement $node The compatibility node from a manifest file. | |
* | |
* @see https://github.com/joomla/joomla-cms/issues/598 for XML specification. | |
*/ |
<?xml version="1.0" encoding="UTF-16" standalone="no"?> | |
<snippets> | |
<category filters="*" id="category_1276571415504" initial_state="1" label="Backend Lists" largeicon="" smallicon=""> | |
<description><![CDATA[Snippets specifically for creating backend list views.]]></description> | |
<item category="category_1276571415504" class="" editorclass="" id="item_1276485904815" label="Controller Set Default View" largeicon="" smallicon="" snippetProvider="org.eclipse.wst.common.snippets.ui.TextSnippetProvider"> | |
<description><![CDATA[This snippet is intended for the master controller and adds the "default_view" property to class definition. The default view is assumed to be the name of the component (less the com_ prefix). If you want to change the default view then add this snippet.]]></description> | |
<content><![CDATA[ /** | |
* @var string The default view. | |
* @since ${SINCE} | |
*/ |
<?xml version="1.0" encoding="UTF-16" standalone="no"?> | |
<snippets> | |
<category filters="*" id="category_1276571442053" initial_state="1" label="Backend Edit Pages" largeicon="" smallicon=""> | |
<description><![CDATA[Snippets specifically for creating backend edit views.]]></description> | |
<item category="category_1276571442053" class="" editorclass="" id="item_1276505902148" label="Backend Item Subcontroller" largeicon="" smallicon="" snippetProvider="org.eclipse.wst.common.snippets.ui.TextSnippetProvider"> | |
<description><![CDATA[This snippet adds the basic sub-controller for single item.]]></description> | |
<content><![CDATA[jimport('joomla.application.component.controllerform'); | |
/** | |
* ${VIEW} Subcontroller. |
<?xml version="1.0" encoding="UTF-16" standalone="no"?> | |
<snippets> | |
<category filters="*" id="category_1303255935762" initial_state="1" label="Backend Support" largeicon="" smallicon=""> | |
<description><![CDATA[Additional snippets that support backend components.]]></description> | |
<item category="category_1303255935762" class="" editorclass="" id="item_1303256255316" label="Add submenu method for backend component helper" largeicon="" smallicon="" snippetProvider="org.eclipse.wst.common.snippets.ui.TextSnippetProvider"> | |
<description><![CDATA[This snippet provides the addSubmenu method that should be added to the backend helper class (usually found in /com_{component}/helpers/{component}.php). One sub-menu entry is provided - copy and paste to suit the number of views that need to be supported. Remember to add the hook into the controller to invoke this method.]]></description> | |
<content><![CDATA[ /** | |
* Configure the Linkbar. | |
* | |
* @param string $vName The name of |