mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
Upgrade Blog plugin to version 1.2.16
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use Backend;
|
||||
use Controller;
|
||||
use RainLab\Blog\Models\Post;
|
||||
use System\Classes\PluginBase;
|
||||
use RainLab\Blog\Classes\TagProcessor;
|
||||
use RainLab\Blog\Models\Category;
|
||||
@@ -26,17 +27,33 @@ class Plugin extends PluginBase
|
||||
'RainLab\Blog\Components\Post' => 'blogPost',
|
||||
'RainLab\Blog\Components\Posts' => 'blogPosts',
|
||||
'RainLab\Blog\Components\Categories' => 'blogCategories',
|
||||
'RainLab\Blog\Components\RssFeed' => 'blogRssFeed',
|
||||
'RainLab\Blog\Components\RssFeed' => 'blogRssFeed'
|
||||
];
|
||||
}
|
||||
|
||||
public function registerPermissions()
|
||||
{
|
||||
return [
|
||||
'rainlab.blog.access_posts' => ['tab' => 'rainlab.blog::lang.blog.tab', 'label' => 'rainlab.blog::lang.blog.access_posts'],
|
||||
'rainlab.blog.access_categories' => ['tab' => 'rainlab.blog::lang.blog.tab', 'label' => 'rainlab.blog::lang.blog.access_categories'],
|
||||
'rainlab.blog.access_other_posts' => ['tab' => 'rainlab.blog::lang.blog.tab', 'label' => 'rainlab.blog::lang.blog.access_other_posts'],
|
||||
'rainlab.blog.access_import_export' => ['tab' => 'rainlab.blog::lang.blog.tab', 'label' => 'rainlab.blog::lang.blog.access_import_export']
|
||||
'rainlab.blog.access_posts' => [
|
||||
'tab' => 'rainlab.blog::lang.blog.tab',
|
||||
'label' => 'rainlab.blog::lang.blog.access_posts'
|
||||
],
|
||||
'rainlab.blog.access_categories' => [
|
||||
'tab' => 'rainlab.blog::lang.blog.tab',
|
||||
'label' => 'rainlab.blog::lang.blog.access_categories'
|
||||
],
|
||||
'rainlab.blog.access_other_posts' => [
|
||||
'tab' => 'rainlab.blog::lang.blog.tab',
|
||||
'label' => 'rainlab.blog::lang.blog.access_other_posts'
|
||||
],
|
||||
'rainlab.blog.access_import_export' => [
|
||||
'tab' => 'rainlab.blog::lang.blog.tab',
|
||||
'label' => 'rainlab.blog::lang.blog.access_import_export'
|
||||
],
|
||||
'rainlab.blog.access_publish' => [
|
||||
'tab' => 'rainlab.blog::lang.blog.tab',
|
||||
'label' => 'rainlab.blog::lang.blog.access_publish'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -49,7 +66,7 @@ class Plugin extends PluginBase
|
||||
'icon' => 'icon-pencil',
|
||||
'iconSvg' => 'plugins/rainlab/blog/assets/images/blog-icon.svg',
|
||||
'permissions' => ['rainlab.blog.*'],
|
||||
'order' => 30,
|
||||
'order' => 300,
|
||||
|
||||
'sideMenu' => [
|
||||
'new_post' => [
|
||||
@@ -93,8 +110,10 @@ class Plugin extends PluginBase
|
||||
/*
|
||||
* Register the image tag processing callback
|
||||
*/
|
||||
TagProcessor::instance()->registerCallback(function($input, $preview){
|
||||
if (!$preview) return $input;
|
||||
TagProcessor::instance()->registerCallback(function($input, $preview) {
|
||||
if (!$preview) {
|
||||
return $input;
|
||||
}
|
||||
|
||||
return preg_replace('|\<img src="image" alt="([0-9]+)"([^>]*)\/>|m',
|
||||
'<span class="image-placeholder" data-index="$1">
|
||||
@@ -114,19 +133,29 @@ class Plugin extends PluginBase
|
||||
*/
|
||||
Event::listen('pages.menuitem.listTypes', function() {
|
||||
return [
|
||||
'blog-category' => 'Blog Category',
|
||||
'all-blog-categories' => 'All Blog Categories'
|
||||
'blog-category' => 'rainlab.blog::lang.menuitem.blog_category',
|
||||
'all-blog-categories' => 'rainlab.blog::lang.menuitem.all_blog_categories',
|
||||
'blog-post' => 'rainlab.blog::lang.menuitem.blog_post',
|
||||
'all-blog-posts' => 'rainlab.blog::lang.menuitem.all_blog_posts',
|
||||
];
|
||||
});
|
||||
|
||||
Event::listen('pages.menuitem.getTypeInfo', function($type) {
|
||||
if ($type == 'blog-category' || $type == 'all-blog-categories')
|
||||
if ($type == 'blog-category' || $type == 'all-blog-categories') {
|
||||
return Category::getMenuTypeInfo($type);
|
||||
}
|
||||
elseif ($type == 'blog-post' || $type == 'all-blog-posts') {
|
||||
return Post::getMenuTypeInfo($type);
|
||||
}
|
||||
});
|
||||
|
||||
Event::listen('pages.menuitem.resolveItem', function($type, $item, $url, $theme) {
|
||||
if ($type == 'blog-category' || $type == 'all-blog-categories')
|
||||
if ($type == 'blog-category' || $type == 'all-blog-categories') {
|
||||
return Category::resolveMenuItem($item, $url, $theme);
|
||||
}
|
||||
elseif ($type == 'blog-post' || $type == 'all-blog-posts') {
|
||||
return Post::resolveMenuItem($item, $url, $theme);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,22 @@ You can also add classes or ids to images by using the [markdown extra](http://m
|
||||
|
||||
{#id .class}
|
||||
|
||||
## Excerpt Vs. Read more
|
||||
|
||||
Posts are managed by selecting *Blog > Posts* from the menu. Each post can contain an excerpt by entering some text in this field on the *Manage* tab. This content is displayed on the page using the `summary` attribute of the blog post.
|
||||
|
||||
{{ post.summary|raw }}
|
||||
|
||||
Alternatively this field can be left blank and the excerpt can be captured from the main content (*Edit* tab). Use the special tag `<!-- more -->` to specify a summary from the main content, all content above this tag will be treated as the summary. For example:
|
||||
|
||||
This is a great introduction to a great blog post. This text is included as part of the excerpt / summary.
|
||||
|
||||
<!-- more -->
|
||||
|
||||
Let's dive in to more detail about why this post is so great. This text will not be included in the summary.
|
||||
|
||||
Finally, if no excerpt is specified and the "more" tag is not used, the blog post will capture the first 600 characters of the content and use this for the summary.
|
||||
|
||||
## Implementing front-end pages
|
||||
|
||||
The plugin provides several components for building the post list page (archive), category page, post details page and category list for the sidebar.
|
||||
@@ -35,6 +51,7 @@ Use the `blogPosts` component to display a list of latest blog posts on a page.
|
||||
* **sortOrder** - the column name and direction used for the sort order of the posts. The default value is **published_at desc**.
|
||||
* **categoryPage** - path to the category page. The default value is **blog/category** - it matches the pages/blog/category.htm file in the theme directory. This property is used in the default component partial for creating links to the blog categories.
|
||||
* **postPage** - path to the post details page. The default value is **blog/post** - it matches the pages/blog/post.htm file in the theme directory. This property is used in the default component partial for creating links to the blog posts.
|
||||
* **exceptPost** - ignore a single post by its slug or unique ID. The ignored post will not be included in the list, useful for showing other/related posts.
|
||||
|
||||
The blogPosts component injects the following variables to the page where it's used:
|
||||
|
||||
@@ -165,7 +182,7 @@ The component can be used on any page, it will hijack the entire page cycle to d
|
||||
==
|
||||
<!-- This markup will never be displayed -->
|
||||
|
||||
## Using markdown
|
||||
## Markdown guide
|
||||
|
||||
October supports [standard markdown syntax](http://daringfireball.net/projects/markdown/) as well as [extended markdown syntax](http://michelf.ca/projects/php-markdown/extra/)
|
||||
|
||||
|
||||
@@ -74,12 +74,16 @@ class Categories extends ComponentBase
|
||||
$categories = BlogCategory::orderBy('name');
|
||||
if (!$this->property('displayEmpty')) {
|
||||
$categories->whereExists(function($query) {
|
||||
$query->select(Db::raw(1))
|
||||
->from('rainlab_blog_posts_categories')
|
||||
->join('rainlab_blog_posts', 'rainlab_blog_posts.id', '=', 'rainlab_blog_posts_categories.post_id')
|
||||
->whereNotNull('rainlab_blog_posts.published')
|
||||
->where('rainlab_blog_posts.published', '=', 1)
|
||||
->whereRaw('rainlab_blog_categories.id = rainlab_blog_posts_categories.category_id');
|
||||
$prefix = Db::getTablePrefix();
|
||||
|
||||
$query
|
||||
->select(Db::raw(1))
|
||||
->from('rainlab_blog_posts_categories')
|
||||
->join('rainlab_blog_posts', 'rainlab_blog_posts.id', '=', 'rainlab_blog_posts_categories.post_id')
|
||||
->whereNotNull('rainlab_blog_posts.published')
|
||||
->where('rainlab_blog_posts.published', '=', 1)
|
||||
->whereRaw($prefix.'rainlab_blog_categories.id = '.$prefix.'rainlab_blog_posts_categories.category_id')
|
||||
;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -56,17 +56,57 @@ class Post extends ComponentBase
|
||||
protected function loadPost()
|
||||
{
|
||||
$slug = $this->property('slug');
|
||||
$post = BlogPost::isPublished()->where('slug', $slug)->first();
|
||||
|
||||
$post = new BlogPost;
|
||||
|
||||
$post = $post->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')
|
||||
? $post->transWhere('slug', $slug)
|
||||
: $post->where('slug', $slug);
|
||||
|
||||
$post = $post->isPublished()->first();
|
||||
|
||||
/*
|
||||
* Add a "url" helper attribute for linking to each category
|
||||
*/
|
||||
if ($post && $post->categories->count()) {
|
||||
$post->categories->each(function($category){
|
||||
$post->categories->each(function($category) {
|
||||
$category->setUrl($this->categoryPage, $this->controller);
|
||||
});
|
||||
}
|
||||
|
||||
return $post;
|
||||
}
|
||||
|
||||
public function previousPost()
|
||||
{
|
||||
return $this->getPostSibling(-1);
|
||||
}
|
||||
|
||||
public function nextPost()
|
||||
{
|
||||
return $this->getPostSibling(1);
|
||||
}
|
||||
|
||||
protected function getPostSibling($direction = 1)
|
||||
{
|
||||
if (!$this->post) {
|
||||
return;
|
||||
}
|
||||
|
||||
$method = $direction === -1 ? 'previousPost' : 'nextPost';
|
||||
|
||||
if (!$post = $this->post->$method()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$postPage = $this->getPage()->getBaseFileName();
|
||||
|
||||
$post->setUrl($postPage, $this->controller);
|
||||
|
||||
$post->categories->each(function($category) {
|
||||
$category->setUrl($this->categoryPage, $this->controller);
|
||||
});
|
||||
|
||||
return $post;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,15 @@ class Posts extends ComponentBase
|
||||
'default' => 'blog/post',
|
||||
'group' => 'Links',
|
||||
],
|
||||
'exceptPost' => [
|
||||
'title' => 'rainlab.blog::lang.settings.posts_except_post',
|
||||
'description' => 'rainlab.blog::lang.settings.posts_except_post_description',
|
||||
'type' => 'string',
|
||||
'validationPattern' => 'string',
|
||||
'validationMessage' => 'rainlab.blog::lang.settings.posts_except_post_validation',
|
||||
'default' => '',
|
||||
'group' => 'Exceptions',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -166,7 +175,9 @@ class Posts extends ComponentBase
|
||||
'page' => $this->property('pageNumber'),
|
||||
'sort' => $this->property('sortOrder'),
|
||||
'perPage' => $this->property('postsPerPage'),
|
||||
'category' => $category
|
||||
'search' => trim(input('search')),
|
||||
'category' => $category,
|
||||
'exceptPost' => $this->property('exceptPost'),
|
||||
]);
|
||||
|
||||
/*
|
||||
@@ -185,12 +196,18 @@ class Posts extends ComponentBase
|
||||
|
||||
protected function loadCategory()
|
||||
{
|
||||
if (!$categoryId = $this->property('categoryFilter'))
|
||||
if (!$slug = $this->property('categoryFilter')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!$category = BlogCategory::whereSlug($categoryId)->first())
|
||||
return null;
|
||||
$category = new BlogCategory;
|
||||
|
||||
return $category;
|
||||
$category = $category->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')
|
||||
? $category->transWhere('slug', $slug)
|
||||
: $category->where('slug', $slug);
|
||||
|
||||
$category = $category->first();
|
||||
|
||||
return $category ?: null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,12 @@ class RssFeed extends ComponentBase
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
],
|
||||
'sortOrder' => [
|
||||
'title' => 'rainlab.blog::lang.settings.posts_order',
|
||||
'description' => 'rainlab.blog::lang.settings.posts_order_description',
|
||||
'type' => 'dropdown',
|
||||
'default' => 'created_at desc',
|
||||
],
|
||||
'postsPerPage' => [
|
||||
'title' => 'rainlab.blog::lang.settings.posts_per_page',
|
||||
'type' => 'string',
|
||||
@@ -84,6 +90,11 @@ class RssFeed extends ComponentBase
|
||||
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
|
||||
}
|
||||
|
||||
public function getSortOrderOptions()
|
||||
{
|
||||
return BlogPost::$allowedSortingOptions;
|
||||
}
|
||||
|
||||
public function onRun()
|
||||
{
|
||||
$this->prepareVars();
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
{% set post = __SELF__.post %}
|
||||
<div class="col-md-3 text-center">
|
||||
<span class="date-big">{{ post.published_at|date('d') }}</span><br/>
|
||||
<span class="date-small">{{ post.published_at|date('M Y') }}</span>
|
||||
<br/><br/>
|
||||
<p><img src="{{ post.user.avatar.path }}" width="100px"/>
|
||||
<br/>{{ post.user.full_name }}</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h1>{{ post.title }}</h1>
|
||||
{% if post.featured_images.count %}
|
||||
<div class="featured-images text-center">
|
||||
{% for image in post.featured_images %}
|
||||
<p>
|
||||
<img
|
||||
data-src="{{ image.filename }}"
|
||||
src="{{ image.path }}"
|
||||
alt="{{ image.description }}"
|
||||
style="width:100%" />
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{{ post.content_html|raw }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">{{ post.content_html|raw }}</div>
|
||||
|
||||
<div class="col-md-3"> </div>
|
||||
{% if post.featured_images.count %}
|
||||
<div class="featured-images text-center">
|
||||
{% for image in post.featured_images %}
|
||||
<p>
|
||||
<img
|
||||
data-src="{{ image.filename }}"
|
||||
src="{{ image.path }}"
|
||||
alt="{{ image.description }}"
|
||||
style="max-width: 100%" />
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="info">
|
||||
Posted
|
||||
{% if post.categories.count %} in
|
||||
{% for category in post.categories %}
|
||||
<a href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
on {{ post.published_at|date('M d, Y') }}
|
||||
</p>
|
||||
|
||||
@@ -1,11 +1,40 @@
|
||||
{% set posts = __SELF__.posts %}
|
||||
|
||||
<ul class="post-list">
|
||||
{% for post in posts %}
|
||||
<article class="news">
|
||||
<div class="news-date">{{ post.published_at|date('M d, Y') }}</div>
|
||||
<div class="news-title">
|
||||
<a href="{{ 'article'|page({ slug: post.slug }) }}">{{ post.title }}</a>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
<li>
|
||||
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
|
||||
|
||||
<p class="info">
|
||||
Posted
|
||||
{% if post.categories.count %} in {% endif %}
|
||||
{% for category in post.categories %}
|
||||
<a href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
on {{ post.published_at|date('M d, Y') }}
|
||||
</p>
|
||||
|
||||
<p class="excerpt">{{ post.summary|raw }}</p>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="no-data">{{ noPostsMessage }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if posts.lastPage > 1 %}
|
||||
<ul class="pagination">
|
||||
{% if posts.currentPage > 1 %}
|
||||
<li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage-1) }) }}">← Prev</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% for page in 1..posts.lastPage %}
|
||||
<li class="{{ posts.currentPage == page ? 'active' : null }}">
|
||||
<a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% if posts.lastPage > posts.currentPage %}
|
||||
<li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage+1) }) }}">Next →</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
15
plugins/rainlab/blog/composer.lock
generated
15
plugins/rainlab/blog/composer.lock
generated
@@ -9,16 +9,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v1.1.0",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "a3595c5272a6f247228abb20076ed27321e4aae9"
|
||||
"reference": "d78064c68299743e0161004f2de3a0204e33b804"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/a3595c5272a6f247228abb20076ed27321e4aae9",
|
||||
"reference": "a3595c5272a6f247228abb20076ed27321e4aae9",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
|
||||
"reference": "d78064c68299743e0161004f2de3a0204e33b804",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -65,6 +65,7 @@
|
||||
"MODX Evo",
|
||||
"Mautic",
|
||||
"OXID",
|
||||
"Plentymarkets",
|
||||
"RadPHP",
|
||||
"SMF",
|
||||
"Thelia",
|
||||
@@ -72,9 +73,11 @@
|
||||
"agl",
|
||||
"aimeos",
|
||||
"annotatecms",
|
||||
"attogram",
|
||||
"bitrix",
|
||||
"cakephp",
|
||||
"chef",
|
||||
"cockpit",
|
||||
"codeigniter",
|
||||
"concrete5",
|
||||
"croogo",
|
||||
@@ -98,16 +101,18 @@
|
||||
"piwik",
|
||||
"ppi",
|
||||
"puppet",
|
||||
"reindex",
|
||||
"roundcube",
|
||||
"shopware",
|
||||
"silverstripe",
|
||||
"symfony",
|
||||
"typo3",
|
||||
"wordpress",
|
||||
"yawik",
|
||||
"zend",
|
||||
"zikula"
|
||||
],
|
||||
"time": "2016-07-05 06:18:20"
|
||||
"time": "2016-08-13 20:53:52"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
||||
@@ -18,6 +18,7 @@ class Posts extends Controller
|
||||
public $formConfig = 'config_form.yaml';
|
||||
public $listConfig = 'config_list.yaml';
|
||||
public $importExportConfig = 'config_import_export.yaml';
|
||||
public $relationConfig;
|
||||
|
||||
public $requiredPermissions = ['rainlab.blog.access_other_posts', 'rainlab.blog.access_posts'];
|
||||
|
||||
@@ -87,8 +88,9 @@ class Posts extends Controller
|
||||
if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
|
||||
|
||||
foreach ($checkedIds as $postId) {
|
||||
if ((!$post = Post::find($postId)) || !$post->canEdit($this->user))
|
||||
if ((!$post = Post::find($postId)) || !$post->canEdit($this->user)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$post->delete();
|
||||
}
|
||||
@@ -104,8 +106,9 @@ class Posts extends Controller
|
||||
*/
|
||||
public function listInjectRowClass($record, $definition = null)
|
||||
{
|
||||
if (!$record->published)
|
||||
if (!$record->published) {
|
||||
return 'safe disabled';
|
||||
}
|
||||
}
|
||||
|
||||
public function formBeforeCreate($model)
|
||||
@@ -123,5 +126,4 @@ class Posts extends Controller
|
||||
'preview' => $previewHtml
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
<a
|
||||
href="<?= Backend::url('rainlab/blog/posts/export') ?>"
|
||||
class="btn btn-default oc-icon-download">
|
||||
Export posts
|
||||
<?= e(trans('rainlab.blog::lang.posts.export_post')) ?>
|
||||
</a>
|
||||
<a
|
||||
href="<?= Backend::url('rainlab/blog/posts/import') ?>"
|
||||
class="btn btn-default oc-icon-upload">
|
||||
Import posts
|
||||
<?= e(trans('rainlab.blog::lang.posts.import_post')) ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ===================================
|
||||
# Filter Scope Definitions
|
||||
# ===================================
|
||||
|
||||
scopes:
|
||||
|
||||
category:
|
||||
@@ -31,6 +32,12 @@ scopes:
|
||||
- published = '1'
|
||||
|
||||
published_date:
|
||||
label: Date
|
||||
|
||||
# Filter name
|
||||
label: rainlab.blog::lang.posts.filter_date
|
||||
|
||||
# Filter type
|
||||
type: daterange
|
||||
conditions: created_at >= ':after' AND created_at <= ':before'
|
||||
|
||||
# SQL Conditions
|
||||
conditions: created_at >= ':after' AND created_at <= ':before'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import:
|
||||
# Page title
|
||||
title: Import posts
|
||||
title: rainlab.blog::lang.posts.import_post
|
||||
|
||||
# Import List Column configuration
|
||||
list: $/rainlab/blog/models/postimport/columns.yaml
|
||||
@@ -23,7 +23,7 @@ import:
|
||||
|
||||
export:
|
||||
# Page title
|
||||
title: Export posts
|
||||
title: rainlab.blog::lang.posts.export_post
|
||||
|
||||
# Output file name
|
||||
fileName: posts.csv
|
||||
|
||||
@@ -68,11 +68,11 @@ class MLBlogMarkdown extends BlogMarkdown
|
||||
/*
|
||||
* Set the translated values to the model
|
||||
*/
|
||||
if ($this->model->methodExists('setTranslateAttribute')) {
|
||||
if ($this->model->methodExists('setAttributeTranslated')) {
|
||||
foreach ($localeData as $locale => $value) {
|
||||
$this->model->setTranslateAttribute('content', $value, $locale);
|
||||
$this->model->setAttributeTranslated('content', $value, $locale);
|
||||
|
||||
$this->model->setTranslateAttribute(
|
||||
$this->model->setAttributeTranslated(
|
||||
'content_html',
|
||||
Post::formatHtml($value),
|
||||
$locale
|
||||
|
||||
@@ -93,6 +93,8 @@ return [
|
||||
'posts_category' => 'страница на категориите',
|
||||
'posts_category_description' => 'Име на страницата за категории , за "публикувано в". Това се използва подразбиране от компонента.',
|
||||
'posts_post' => 'Post page',
|
||||
'posts_post_description' => 'Име на страницата за публикации "Прочетете повече". Това се използва подразбиране от компонента.'
|
||||
'posts_post_description' => 'Име на страницата за публикации "Прочетете повече". Това се използва подразбиране от компонента.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -17,16 +17,20 @@ return [
|
||||
'access_categories' => 'Správa blogových kategorií',
|
||||
'access_other_posts' => 'Správa příspěvků ostatních uživatelů',
|
||||
'access_import_export' => 'Možnost importu a exportu příspěvků',
|
||||
'access_publish' => 'Možnost publikovat příspěvky',
|
||||
'delete_confirm' => 'Jste si jistí?',
|
||||
'chart_published' => 'Publikované',
|
||||
'chart_drafts' => 'Návrhy',
|
||||
'chart_total' => 'Celkem'
|
||||
'chart_total' => 'Celkem',
|
||||
],
|
||||
'posts' => [
|
||||
'list_title' => 'Správa blogových příspěvků',
|
||||
'filter_category' => 'Kategorie',
|
||||
'filter_published' => 'Schovat publikované',
|
||||
'new_post' => 'Nový příspěvek'
|
||||
'filter_date' => 'Datum',
|
||||
'new_post' => 'Nový příspěvek',
|
||||
'export_post' => 'Export příspěvků',
|
||||
'import_post' => 'Import příspěvků',
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Název',
|
||||
@@ -55,12 +59,12 @@ return [
|
||||
'featured_images' => 'Obrázky',
|
||||
'delete_confirm' => 'Opravdu chcete smazat tento příspěvek?',
|
||||
'close_confirm' => 'Příspěvek není uložený.',
|
||||
'return_to_posts' => 'Zpět na seznam příspěvků'
|
||||
'return_to_posts' => 'Zpět na seznam příspěvků',
|
||||
],
|
||||
'categories' => [
|
||||
'list_title' => 'Správa blogových kategorií',
|
||||
'new_category' => 'Nová kategorie',
|
||||
'uncategorized' => 'Nezařazeno'
|
||||
'uncategorized' => 'Nezařazeno',
|
||||
],
|
||||
'category' => [
|
||||
'name' => 'Název',
|
||||
@@ -69,7 +73,12 @@ return [
|
||||
'slug_placeholder' => 'zadejte-url-kategorie',
|
||||
'posts' => 'Počet příspěvků',
|
||||
'delete_confirm' => 'Opravdu chcete smazat tuto kategorii?',
|
||||
'return_to_categories' => 'Zpět na seznam blogových kategorií'
|
||||
'return_to_categories' => 'Zpět na seznam blogových kategorií',
|
||||
'reorder' => 'Změnit pořadí',
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blogová kategorie',
|
||||
'all_blog_categories' => 'Všechny blogové kategorie',
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Seznam kategorií',
|
||||
@@ -101,6 +110,12 @@ return [
|
||||
'posts_category' => 'Stránka kategorií',
|
||||
'posts_category_description' => 'Vyberte stránku která slouží k zobrazení všech kategorií (nebo detailu kategorie).',
|
||||
'posts_post' => 'Stránka příspěvků',
|
||||
'posts_post_description' => 'Vyberte stránku která slouží k zobrazení článků (nebo detailu článku).'
|
||||
'posts_post_description' => 'Vyberte stránku která slouží k zobrazení článků (nebo detailu článku).',
|
||||
'posts_except_post' => 'Vyloučit příspěvěk',
|
||||
'posts_except_post_description' => 'Zadejte ID nebo URL příspěvku který chcete vyloučit',
|
||||
'rssfeed_blog' => 'Blogová stránka',
|
||||
'rssfeed_blog_description' => 'Name of the main blog page file for generating links. This property is used by the default component partial.',
|
||||
'rssfeed_title' => 'RSS Kanál',
|
||||
'rssfeed_description' => 'Vygeneruje RSS kanál který obsahuje blogové příspěvky.',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -16,6 +16,8 @@ return [
|
||||
'access_posts' => 'Blog Artikel verwalten',
|
||||
'access_categories' => 'Blog Kategorien verwalten',
|
||||
'access_other_posts' => 'Blog Artikel anderer Benutzer verwalten',
|
||||
'access_import_export' => 'Blog Artikel importieren oder exportieren',
|
||||
'access_publish' => 'Kann Artikel veröffentlichen',
|
||||
'delete_confirm' => 'Bist du sicher?',
|
||||
'chart_published' => 'Veröffentlicht',
|
||||
'chart_drafts' => 'Entwurf',
|
||||
@@ -25,17 +27,26 @@ return [
|
||||
'list_title' => 'Blog Artikel verwalten',
|
||||
'filter_category' => 'Kategorie',
|
||||
'filter_published' => 'Veröffentlichte ausblenden',
|
||||
'new_post' => 'Neuer Artikel'
|
||||
'filter_date' => 'Date',
|
||||
'new_post' => 'Neuer Artikel',
|
||||
'export_post' => 'Exportiere Artikel',
|
||||
'import_post' => 'Importiere Artikel'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Titel',
|
||||
'title_placeholder' => 'Neuer Titel',
|
||||
'content' => 'Inhalt',
|
||||
'content_html' => 'HTML-Inhalt',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'new-post-slug',
|
||||
'slug_placeholder' => 'neuer-artikel-slug',
|
||||
'categories' => 'Kategorien',
|
||||
'author_email' => 'Autor E-Mail',
|
||||
'created' => 'Erstellt',
|
||||
'created_date' => 'Erstellzeitpunkt',
|
||||
'updated' => 'Aktualisiert',
|
||||
'updated_date' => 'Aktualisierungszeitpunk',
|
||||
'published' => 'Veröffentlicht',
|
||||
'published_date' => 'Veröffentlichungszeitpunkt',
|
||||
'published_validation' => 'Bitte gebe das Datum der Veröffentlichung an',
|
||||
'tab_edit' => 'Bearbeiten',
|
||||
'tab_categories' => 'Kategorien',
|
||||
@@ -44,8 +55,9 @@ return [
|
||||
'tab_manage' => 'Verwalten',
|
||||
'published_on' => 'Veröffentlicht am',
|
||||
'excerpt' => 'Textauszug',
|
||||
'summary' => 'Zusammenfassung',
|
||||
'featured_images' => 'Zugehörige Bilder',
|
||||
'delete_confirm' => 'Möchtest du diesen Post wirklich löschen?',
|
||||
'delete_confirm' => 'Möchtest du diesen Artikel wirklich löschen?',
|
||||
'close_confirm' => 'Der Artikel ist noch nicht gespeichert.',
|
||||
'return_to_posts' => 'Zurück zur Artikel-Übersicht'
|
||||
],
|
||||
@@ -57,16 +69,24 @@ return [
|
||||
'category' => [
|
||||
'name' => 'Name',
|
||||
'name_placeholder' => 'Neuer Kategorie Name',
|
||||
'description' => 'Beschreibung',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'new-category-slug',
|
||||
'posts' => 'Posts',
|
||||
'slug_placeholder' => 'neuer-kategorie-slug',
|
||||
'posts' => 'Artikel',
|
||||
'delete_confirm' => 'Möchtest du die Kategorie wirklich löschen?',
|
||||
'return_to_categories' => 'Zurück zur Kategorie-Übersicht.'
|
||||
'return_to_categories' => 'Zurück zur Kategorie-Übersicht.',
|
||||
'reorder' => 'Kategorien sortieren'
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blog Kategorie',
|
||||
'all_blog_categories' => 'Alle Blog Kategorien',
|
||||
'blog_post' => 'Blog Artikel',
|
||||
'all_blog_posts' => 'Alle Blog Artikel'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Blog Kategorie-Übersicht',
|
||||
'category_description' => 'Zeigt eine Blog Kategorien-Übersicht.',
|
||||
'category_slug' => 'Slug param name',
|
||||
'category_slug' => 'Slug Parametername',
|
||||
'category_slug_description' => 'Der URL-Routen-Parameter welcher verwendet wird um die aktuelle Kategorie zu bestimmen. Wird von der Standard-Komponente benötigt um die aktive Kategorie zu markieren.',
|
||||
'category_display_empty' => 'Leere Kategorien anzeigen',
|
||||
'category_display_empty_description' => 'Kategorien zeigen welche keine Artikel besitzen.',
|
||||
@@ -74,14 +94,14 @@ return [
|
||||
'category_page_description' => 'Name der Kategorien-Seiten-Datei für die Kategorien Links. Wird von der Standard-Komponente benötigt.',
|
||||
'post_title' => 'Blog Artikel',
|
||||
'post_description' => 'Zeigt einen Blog Artikel auf der Seite.',
|
||||
'post_slug' => 'Slug Parameter Name',
|
||||
'post_slug' => 'Slug Parametername',
|
||||
'post_slug_description' => 'Der URL-Routen-Parameter um den Post mittels "Slug" zu bestimmen.',
|
||||
'post_category' => 'Kategorien-Seite',
|
||||
'post_category_description' => 'Name der Kategorien-Seiten-Datei für Kategorie-Links.',
|
||||
'posts_title' => 'Blog Artikel-Übersicht',
|
||||
'posts_description' => 'Stellt eine Liste der neuesten Artikel auf der Seite dar.',
|
||||
'posts_pagination' => 'Blättern Parameter-Name',
|
||||
'posts_pagination_description' => 'Der erwartete Parameter-Name welcher für Seiten verwendet wird.',
|
||||
'posts_pagination' => 'Blättern Parametername',
|
||||
'posts_pagination_description' => 'Der erwartete Parametername welcher für Seiten verwendet wird.',
|
||||
'posts_filter' => 'Kategorien-Filter',
|
||||
'posts_filter_description' => 'Bitte gebe ein Kategorien-Slug oder URL-Parameter an, mittels den die Artikel gefiltert werden. Wenn der Wert leer ist, werden alle Artikel angezeigt.',
|
||||
'posts_per_page' => 'Artikel pro Seite',
|
||||
@@ -93,6 +113,12 @@ return [
|
||||
'posts_category' => 'Kategorien-Seite',
|
||||
'posts_category_description' => 'Name der Kategorien-Seiten-Datei für "Veröffentlicht in" Kategorien-Links. Dieser Wert von der Standard-Komponente verwendet.',
|
||||
'posts_post' => 'Artikel Seite',
|
||||
'posts_post_description' => 'Name der Artikel-Seiten-Datei für die "Erfahre mehr" Links. Dieser Wert für von der Standard-Komponente verwendet.'
|
||||
'posts_post_description' => 'Name der Artikel-Seiten-Datei für die "Erfahre mehr" Links. Dieser Wert für von der Standard-Komponente verwendet.',
|
||||
'posts_except_post' => 'Artikel ausschließen',
|
||||
'posts_except_post_description' => 'Gebe direkt die ID/URL oder eine Variable mit der Artikel-ID/URL an um diesen Artikel auszuschließen. Dieser Wert für von der Standard-Komponente verwendet.',
|
||||
'rssfeed_blog' => 'Blog Seite',
|
||||
'rssfeed_blog_description' => 'Name der Artikel-Seiten-Datei für die Links. Dieser Wert für von der Standard-Komponente verwendet.',
|
||||
'rssfeed_title' => 'RSS-Feed',
|
||||
'rssfeed_description' => 'Erstellt einen RSS-Feed mit Artikeln aus dem Blog.'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -17,6 +17,7 @@ return [
|
||||
'access_categories' => 'Manage the blog categories',
|
||||
'access_other_posts' => 'Manage other users blog posts',
|
||||
'access_import_export' => 'Allowed to import and export posts',
|
||||
'access_publish' => 'Allowed to publish posts',
|
||||
'delete_confirm' => 'Are you sure?',
|
||||
'chart_published' => 'Published',
|
||||
'chart_drafts' => 'Drafts',
|
||||
@@ -26,7 +27,10 @@ return [
|
||||
'list_title' => 'Manage the blog posts',
|
||||
'filter_category' => 'Category',
|
||||
'filter_published' => 'Published',
|
||||
'new_post' => 'New post'
|
||||
'filter_date' => 'Date',
|
||||
'new_post' => 'New post',
|
||||
'export_post' => 'Export posts',
|
||||
'import_post' => 'Import posts'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Title',
|
||||
@@ -53,7 +57,7 @@ return [
|
||||
'excerpt' => 'Excerpt',
|
||||
'summary' => 'Summary',
|
||||
'featured_images' => 'Featured Images',
|
||||
'delete_confirm' => 'Do you really want to delete this post?',
|
||||
'delete_confirm' => 'Delete this post?',
|
||||
'close_confirm' => 'The post is not saved.',
|
||||
'return_to_posts' => 'Return to posts list'
|
||||
],
|
||||
@@ -65,13 +69,20 @@ return [
|
||||
'category' => [
|
||||
'name' => 'Name',
|
||||
'name_placeholder' => 'New category name',
|
||||
'description' => 'Description',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'new-category-slug',
|
||||
'posts' => 'Posts',
|
||||
'delete_confirm' => 'Do you really want to delete this category?',
|
||||
'delete_confirm' => 'Delete this category?',
|
||||
'return_to_categories' => 'Return to the blog category list',
|
||||
'reorder' => 'Reorder Categories'
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blog category',
|
||||
'all_blog_categories' => 'All blog categories',
|
||||
'blog_post' => 'Blog post',
|
||||
'all_blog_posts' => 'All blog posts'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Category List',
|
||||
'category_description' => 'Displays a list of blog categories on the page.',
|
||||
@@ -103,9 +114,11 @@ return [
|
||||
'posts_category_description' => 'Name of the category page file for the "Posted into" category links. This property is used by the default component partial.',
|
||||
'posts_post' => 'Post page',
|
||||
'posts_post_description' => 'Name of the blog post page file for the "Learn more" links. This property is used by the default component partial.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
'rssfeed_blog' => 'Blog page',
|
||||
'rssfeed_blog_description' => 'Name of the main blog page file for generating links. This property is used by the default component partial.',
|
||||
'rssfeed_title' => 'RSS Feed',
|
||||
'rssfeed_description' => 'Generates an RSS feed containing posts from the blog.',
|
||||
'rssfeed_description' => 'Generates an RSS feed containing posts from the blog.'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -69,7 +69,8 @@ return [
|
||||
'slug_placeholder' => 'آدرس-جدید-دسته-بندی',
|
||||
'posts' => 'پست ها',
|
||||
'delete_confirm' => 'آیا از حذف این دسته بندی اطمینان دارید؟',
|
||||
'return_to_categories' => 'بازگشت به لیست دسته بندی های وبلاگ'
|
||||
'return_to_categories' => 'بازگشت به لیست دسته بندی های وبلاگ',
|
||||
'reorder' => 'مرتب سازی دسته بندی ها'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'لیست دسته بندی',
|
||||
@@ -101,6 +102,8 @@ return [
|
||||
'posts_category' => 'صفحه دسته بندی',
|
||||
'posts_category_description' => 'نام صفحه دسته بندی برای نمایش پستهای مربوط به آن.',
|
||||
'posts_post' => 'صفحه پست',
|
||||
'posts_post_description' => 'نام صفحه مربوط به نمایش کامل پست ها جهت لینک ادامه مطلب'
|
||||
'posts_post_description' => 'نام صفحه مربوط به نمایش کامل پست ها جهت لینک ادامه مطلب',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -17,6 +17,7 @@ return [
|
||||
'access_categories' => 'Gérer les catégories',
|
||||
'access_other_posts' => 'Gérer les articles d’autres utilisateurs',
|
||||
'access_import_export' => 'Autorisé à importer et exporter des articles',
|
||||
'access_publish' => 'Autorisé à publier des articles',
|
||||
'delete_confirm' => 'Confirmez-vous la suppression des articles sélectionnés ?',
|
||||
'chart_published' => 'Publié',
|
||||
'chart_drafts' => 'Brouillons',
|
||||
@@ -26,7 +27,10 @@ return [
|
||||
'list_title' => 'Gérer les articles du blog',
|
||||
'filter_category' => 'Catégorie',
|
||||
'filter_published' => 'Masquer la publication',
|
||||
'new_post' => 'Nouvel article'
|
||||
'filter_date' => 'Date',
|
||||
'new_post' => 'Nouvel article',
|
||||
'export_post' => 'Exporter les articles',
|
||||
'import_post' => 'Importer des articles'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Titre',
|
||||
@@ -65,6 +69,7 @@ return [
|
||||
'category' => [
|
||||
'name' => 'Nom',
|
||||
'name_placeholder' => 'Nom de la nouvelle catégorie',
|
||||
'description' => 'Description',
|
||||
'slug' => 'Adresse URL',
|
||||
'slug_placeholder' => 'adresse-de-la-nouvelle-catégorie',
|
||||
'posts' => 'Articles',
|
||||
@@ -72,6 +77,10 @@ return [
|
||||
'return_to_categories' => 'Retour à la liste des catégories',
|
||||
'reorder' => 'Réorganiser les catégories'
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Catégories du blog',
|
||||
'all_blog_categories' => 'Toutes les catégories du blog'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Liste des catégories',
|
||||
'category_description' => 'Afficher une liste des catégories sur la page.',
|
||||
@@ -99,9 +108,15 @@ return [
|
||||
'posts_no_posts_description' => 'Message à afficher dans la liste d’articles lorsqu’il n’y a aucun article. Cette propriété est utilisée par le partial par défaut du composant.',
|
||||
'posts_order' => 'Ordre des articles',
|
||||
'posts_order_description' => 'Attribut selon lequel les articles seront ordonnés',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
'posts_category' => 'Page des catégories',
|
||||
'posts_category_description' => 'Nom de la page des catégories pour les liens de catégories "Publié dans". Cette propriété est utilisée par le partial par défaut du composant.',
|
||||
'posts_post' => 'Page d’article',
|
||||
'posts_post_description' => 'Nom de la page d’articles pour les liens "En savoir plus". Cette propriété est utilisée par le partial par défaut du composant.'
|
||||
'posts_post_description' => 'Nom de la page d’articles pour les liens "En savoir plus". Cette propriété est utilisée par le partial par défaut du composant.',
|
||||
'rssfeed_blog' => 'Page du blog',
|
||||
'rssfeed_blog_description' => 'Nom de la page principale du blog pour générer les liens. Cette propriété est utilisé par le composant dans le partial.',
|
||||
'rssfeed_title' => 'Flux RSS',
|
||||
'rssfeed_description' => 'Génère un Flux RSS contenant les articles du blog.'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -17,16 +17,20 @@ return [
|
||||
'access_categories' => 'Blog kategóriák kezelése',
|
||||
'access_other_posts' => 'Más felhasználók bejegyzéseinek kezelése',
|
||||
'access_import_export' => 'Bejegyzések importálása és exportálása',
|
||||
'delete_confirm' => 'Valóban törölni akarja a kijelölt bejegyzéseket?',
|
||||
'access_publish' => 'Blog bejegyzések közzététele',
|
||||
'delete_confirm' => 'Törölni akarja a kijelölt bejegyzéseket?',
|
||||
'chart_published' => 'Közzétéve',
|
||||
'chart_drafts' => 'Piszkozatok',
|
||||
'chart_total' => 'Összesen'
|
||||
],
|
||||
'posts' => [
|
||||
'list_title' => 'Blog bejegyzések kezelése',
|
||||
'list_title' => 'Blog bejegyzések',
|
||||
'filter_category' => 'Kategória',
|
||||
'filter_published' => 'Közzétettek elrejtése',
|
||||
'new_post' => 'Új bejegyzés'
|
||||
'filter_published' => 'Közzétéve',
|
||||
'filter_date' => 'Létrehozva',
|
||||
'new_post' => 'Új bejegyzés',
|
||||
'export_post' => 'Exportálás',
|
||||
'import_post' => 'Importálás'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Cím',
|
||||
@@ -39,8 +43,8 @@ return [
|
||||
'author_email' => 'Szerző e-mail címe',
|
||||
'created' => 'Létrehozva',
|
||||
'created_date' => 'Létrehozás dátuma',
|
||||
'updated' => 'Frissítve',
|
||||
'updated_date' => 'Frissítés dátuma',
|
||||
'updated' => 'Módosítva',
|
||||
'updated_date' => 'Módosítás dátuma',
|
||||
'published' => 'Közzétéve',
|
||||
'published_date' => 'Közzététel dátuma',
|
||||
'published_validation' => 'Adja meg a közzététel dátumát',
|
||||
@@ -58,18 +62,26 @@ return [
|
||||
'return_to_posts' => 'Vissza a bejegyzésekhez'
|
||||
],
|
||||
'categories' => [
|
||||
'list_title' => 'A blog kategóriák kezelése',
|
||||
'list_title' => 'Blog kategóriák',
|
||||
'new_category' => 'Új kategória',
|
||||
'uncategorized' => 'Nincs kategorizálva'
|
||||
],
|
||||
'category' => [
|
||||
'name' => 'Név',
|
||||
'name_placeholder' => 'Új kategória neve',
|
||||
'description' => 'Leírás',
|
||||
'slug' => 'Keresőbarát cím',
|
||||
'slug_placeholder' => 'uj-kategoria-keresobarat-neve',
|
||||
'posts' => 'Bejegyzések',
|
||||
'delete_confirm' => 'Valóban törölni akarja ezt a kategóriát?',
|
||||
'return_to_categories' => 'Vissza a kategóriákhoz'
|
||||
'return_to_categories' => 'Vissza a kategóriákhoz',
|
||||
'reorder' => 'Kategóriák sorrendje'
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blog kategória',
|
||||
'all_blog_categories' => 'Összes blog kategória',
|
||||
'blog_post' => 'Blog bejegyzés',
|
||||
'all_blog_posts' => 'Összes blog bejegyzés'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Blog kategória lista',
|
||||
@@ -80,7 +92,7 @@ return [
|
||||
'category_display_empty_description' => 'Azon kategóriák megjelenítése, melyekben nincs egy bejegyzés sem.',
|
||||
'category_page' => 'Kategórialap',
|
||||
'category_page_description' => 'A kategória hivatkozások kategórialap fájljának neve. Az alapértelmezett komponensrész használja ezt a tulajdonságot.',
|
||||
'post_title' => 'Blogbejegyzés',
|
||||
'post_title' => 'Blog bejegyzés',
|
||||
'post_description' => 'Egy blog bejegyzést jelez ki a lapon.',
|
||||
'post_slug' => 'Keresőbarát cím paraméter neve',
|
||||
'post_slug_description' => 'A webcím útvonal paramétere a bejegyzés keresőbarát címe alapján való kereséséhez.',
|
||||
@@ -97,10 +109,16 @@ return [
|
||||
'posts_no_posts' => 'Nincsenek bejegyzések üzenet ',
|
||||
'posts_no_posts_description' => 'A blog bejegyzés listában kijelezendő üzenet abban az esetben, ha nincsenek bejegyzések. Az alapértelmezett komponensrész használja ezt a tulajdonságot.',
|
||||
'posts_order' => 'Bejegyzések sorrendje',
|
||||
'posts_order_description' => 'Attribútum, mely alapján rendezni kell a bejegyzéseket',
|
||||
'posts_order_description' => 'Jellemző, ami alapján rendezni kell a bejegyzéseket',
|
||||
'posts_category' => 'Kategórialap',
|
||||
'posts_category_description' => 'A "Kategória" kategória hivatkozások kategórialap fájljának neve. Az alapértelmezett komponensrész használja ezt a tulajdonságot.',
|
||||
'posts_post' => 'Bejegyzéslap',
|
||||
'posts_post_description' => 'A "Tovább olvasom" hivatkozások blog bejegyzéslap fájljának neve. Az alapértelmezett komponensrész használja ezt a tulajdonságot.'
|
||||
'posts_post_description' => 'A "Tovább olvasom" hivatkozások blog bejegyzéslap fájljának neve. Az alapértelmezett komponensrész használja ezt a tulajdonságot.',
|
||||
'posts_except_post' => 'Bejegyzés kizárása',
|
||||
'posts_except_post_description' => 'Adja meg annak a bejegyzésnek az azonosítóját vagy webcímét, amit nem akar megjeleníteni a listázáskor.',
|
||||
'rssfeed_blog' => 'Blog oldal',
|
||||
'rssfeed_blog_description' => 'Annak a lapnak a neve, ahol listázódnak a blog bejegyzések. Ezt a beállítást használja alapértelmezetten a blog komponens is.',
|
||||
'rssfeed_title' => 'RSS hírfolyam',
|
||||
'rssfeed_description' => 'A bloghoz tartozó RSS hírfolyam generálása.'
|
||||
]
|
||||
];
|
||||
|
||||
107
plugins/rainlab/blog/lang/it/lang.php
Normal file
107
plugins/rainlab/blog/lang/it/lang.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'plugin' => [
|
||||
'name' => 'Blog',
|
||||
'description' => 'Una solida piattaforma di blogging.'
|
||||
],
|
||||
'blog' => [
|
||||
'menu_label' => 'Blog',
|
||||
'menu_description' => 'Gestisci i post',
|
||||
'posts' => 'Post',
|
||||
'create_post' => 'post del blog',
|
||||
'categories' => 'Categorie',
|
||||
'create_category' => 'categorie del blog',
|
||||
'tab' => 'Blog',
|
||||
'access_posts' => 'Gestisci i post',
|
||||
'access_categories' => 'Gestisci le categorie',
|
||||
'access_other_posts' => 'Gestisci i post di altri utenti',
|
||||
'access_import_export' => 'Permesso ad importare ed esportare i post',
|
||||
'delete_confirm' => 'Sei sicuro?',
|
||||
'chart_published' => 'Pubblicato',
|
||||
'chart_drafts' => 'Bozze',
|
||||
'chart_total' => 'Totale'
|
||||
],
|
||||
'posts' => [
|
||||
'list_title' => 'Gestisci i post',
|
||||
'category' => 'Categoria',
|
||||
'hide_published' => 'Nascondi pubblicati',
|
||||
'new_post' => 'Nuovo post'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Titolo',
|
||||
'title_placeholder' => 'Titolo del nuovo post',
|
||||
'content' => 'Contenuto',
|
||||
'content_html' => 'Contenuto HTML',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'slug-del-nuovo-post',
|
||||
'categories' => 'Categorie',
|
||||
'author_email' => 'Email dell\'autore',
|
||||
'created' => 'Creato',
|
||||
'created_date' => 'Data di creazione',
|
||||
'updated' => 'Aggiornato',
|
||||
'updated_date' => 'Data di aggiornamento',
|
||||
'published' => 'Pubblicato',
|
||||
'published_date' => 'Data di pubblicazione',
|
||||
'published_validation' => 'Per favore fornisci la data di pubblicazione',
|
||||
'tab_edit' => 'Modifica',
|
||||
'tab_categories' => 'Categorie',
|
||||
'categories_comment' => 'Seleziona le categorie a cui appartiene il post',
|
||||
'categories_placeholder' => 'Non ci sono categorie, per iniziare dovresti crearne una!',
|
||||
'tab_manage' => 'Gestisci',
|
||||
'published_on' => 'Pubblicato il',
|
||||
'excerpt' => 'Estratto',
|
||||
'summary' => 'Riassunto',
|
||||
'featured_images' => 'Immagini in evidenza',
|
||||
'delete_confirm' => 'Vuoi veramente cancellare questo post?',
|
||||
'close_confirm' => 'Questo post non è salvato.',
|
||||
'return_to_posts' => 'Ritorna all\'elenco dei post'
|
||||
],
|
||||
'categories' => [
|
||||
'list_title' => 'Gestisci le categorie del blog',
|
||||
'new_category' => 'Nuova categoria',
|
||||
'uncategorized' => 'Non categorizzato'
|
||||
],
|
||||
'category' => [
|
||||
'name' => 'Nome',
|
||||
'name_placeholder' => 'Nome della nuova categoria',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'slug-nuova-categoria',
|
||||
'posts' => 'Post',
|
||||
'delete_confirm' => 'Vuoi veramente cancellare questa categoria?',
|
||||
'return_to_categories' => 'Ritorna all\'elenco delle categorie del blog',
|
||||
'reorder' => 'Riordino Categorie'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Elenco Categorie',
|
||||
'category_description' => 'Mostra un\'elenco delle categorie del blog sulla pagina.',
|
||||
'category_slug' => 'Slug categoria',
|
||||
'category_slug_description' => "Cerca la categoria del blog usando lo slug fornito. Questa proprietà è usata dal componente parziale di default per segnare la categoria attualmente usata.",
|
||||
'category_display_empty' => 'Mostra categorie vuote',
|
||||
'category_display_empty_description' => 'Mostra categorie che non hanno alcun post.',
|
||||
'category_page' => 'Pagina delle categorie',
|
||||
'category_page_description' => 'Nome del file della pagina delle categorie contenente i link delle categorie. Questa proprietà è usata dal componente parziale di default.',
|
||||
'post_title' => 'Post',
|
||||
'post_description' => 'Mostra un post sulla pagina.',
|
||||
'post_slug' => 'Slug del post',
|
||||
'post_slug_description' => "Cerca il post con lo slug fornito.",
|
||||
'post_category' => 'Pagina delle categorie',
|
||||
'post_category_description' => 'Nome del file della pagina delle categorie contenente i link delle categorie. Questa proprietà è usata dal componente parziale di default.',
|
||||
'posts_title' => 'Elenco dei post',
|
||||
'posts_description' => 'Mostra un\'elenco degli ultimi post sulla pagina.',
|
||||
'posts_pagination' => 'Numero di pagina',
|
||||
'posts_pagination_description' => 'Questo valore è usato per determinare su quale pagina è l\'utente.',
|
||||
'posts_filter' => 'Filtro delle categorie',
|
||||
'posts_filter_description' => 'Inserisci lo slug di una categoria o un parametro dell\'URL con il quale filtrare i post. Lascia vuoto per mostrare tutti i post.',
|
||||
'posts_per_page' => 'Post per pagina',
|
||||
'posts_per_page_validation' => 'Il valore di post per pagina ha un formato non valido ',
|
||||
'posts_no_posts' => 'Messaggio per l\'assenza di post',
|
||||
'posts_no_posts_description' => 'Messaggio da mostrare nell\'elenco dei post in caso non ce ne siano. Questa proprietà è usata dal componente parziale di default.',
|
||||
'posts_order' => 'Ordine dei post',
|
||||
'posts_order_description' => 'Attributo sul quale i post dovrebbero esser ordinati',
|
||||
'posts_category' => 'Pagina delle categorie',
|
||||
'posts_category_description' => 'Nome del file per la pagina delle categorie per i link "Postato in" alle categorie. Questa proprietà è usata dal componente parziale di default.',
|
||||
'posts_post' => 'Pagina del post',
|
||||
'posts_post_description' => 'Nome del file per la pagina del post per i link "Scopri di più". Questa proprietà è usata dal componente parziale di default.'
|
||||
]
|
||||
];
|
||||
@@ -93,6 +93,8 @@ return [
|
||||
'posts_category' => 'カテゴリページ',
|
||||
'posts_category_description' => 'カテゴリリンクを生成するために、カテゴリページのファイル名を指定します。この項目はコンポーネントのデフォルトパーシャルで使用されます。',
|
||||
'posts_post' => '投稿ページ',
|
||||
'posts_post_description' => '"Learn more"リンクを生成するため、投稿ページのファイル名を指定します。拡張子(.htm)は省いてください。この項目はコンポーネントのデフォルトパーシャルで使用されます。'
|
||||
'posts_post_description' => '"Learn more"リンクを生成するため、投稿ページのファイル名を指定します。拡張子(.htm)は省いてください。この項目はコンポーネントのデフォルトパーシャルで使用されます。',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -93,5 +93,7 @@ return [
|
||||
'posts_category_description' => 'Name of the category page file for the "Posted into" category links. This property is used by the default component partial.',
|
||||
'posts_post' => 'Post page',
|
||||
'posts_post_description' => 'Name of the blog post page file for the "Learn more" links. This property is used by the default component partial.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -101,6 +101,8 @@ return [
|
||||
'posts_category' => 'Categorie pagina',
|
||||
'posts_category_description' => 'Naam van categorie pagina bestand voor gekoppeld artikel overzichts pagina. Deze waarde wordt standaard gebruikt door de partial.',
|
||||
'posts_post' => 'Artikel pagina',
|
||||
'posts_post_description' => 'Naam van blog pagina bestand voor de "Lees meer" links. Deze waarde wordt standaard gebruikt door de partial.'
|
||||
'posts_post_description' => 'Naam van blog pagina bestand voor de "Lees meer" links. Deze waarde wordt standaard gebruikt door de partial.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -93,6 +93,8 @@ return [
|
||||
'posts_category' => 'Strona kategorii',
|
||||
'posts_category_description' => 'Nazwa strony kategorii w wyświetlaniu linków "Posted into" [Opublikowano w]. Ten parametr jest domyślnie używany przez komponent.',
|
||||
'posts_post' => 'Strona postu',
|
||||
'posts_post_description' => 'Nazwa strony postu dla linków "Learn more" [Czytaj więcej]. Ten parametr jest domyślnie używany przez komponent.'
|
||||
'posts_post_description' => 'Nazwa strony postu dla linków "Learn more" [Czytaj więcej]. Ten parametr jest domyślnie używany przez komponent.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -9,14 +9,15 @@ return [
|
||||
'menu_label' => 'Blog',
|
||||
'menu_description' => 'Gerencie os posts do blog',
|
||||
'posts' => 'Posts',
|
||||
'create_post' => 'blog post',
|
||||
'create_post' => 'Blog post',
|
||||
'categories' => 'Categorias',
|
||||
'create_category' => 'blog categoria',
|
||||
'create_category' => 'Blog categoria',
|
||||
'tab' => 'Blog',
|
||||
'access_posts' => 'Gerencie os posts do blog',
|
||||
'access_categories' => 'Gerenciar as categorias de blog',
|
||||
'access_other_posts' => 'Gerencie outros postos de usuários do blog',
|
||||
'access_other_posts' => 'Gerencie outros posts de usuários do blog',
|
||||
'access_import_export' => 'Permissão para importação e exportação de mensagens',
|
||||
'access_publish' => 'Permitido publicar posts',
|
||||
'delete_confirm' => 'Você tem certeza?',
|
||||
'chart_published' => 'Publicados',
|
||||
'chart_drafts' => 'Rascunhos',
|
||||
@@ -26,7 +27,10 @@ return [
|
||||
'list_title' => 'Gerencie os posts do blog',
|
||||
'filter_category' => 'Categoria',
|
||||
'filter_published' => 'Esconder publicados',
|
||||
'new_post' => 'Novo post'
|
||||
'filter_date' => 'Data',
|
||||
'new_post' => 'Novo post',
|
||||
'export_post' => 'Exportar posts',
|
||||
'import_post' => 'Importar posts'
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Título',
|
||||
@@ -65,11 +69,19 @@ return [
|
||||
'category' => [
|
||||
'name' => 'Nome',
|
||||
'name_placeholder' => 'Novo nome para a categoria',
|
||||
'description' => 'Descrição',
|
||||
'slug' => 'Slug',
|
||||
'slug_placeholder' => 'novo-slug-da-categoria',
|
||||
'posts' => 'Posts',
|
||||
'delete_confirm' => 'Você realmente quer apagar esta categoria?',
|
||||
'return_to_categories' => 'Voltar para a lista de categorias do blog'
|
||||
'return_to_categories' => 'Voltar para a lista de categorias do blog',
|
||||
'reorder' => 'Reordenar Categorias'
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blog categoria',
|
||||
'all_blog_categories' => 'Todas as categorias de blog',
|
||||
'blog_post' => 'Blog post',
|
||||
'all_blog_posts' => 'Todas as postagens do blog'
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Lista de categoria',
|
||||
@@ -101,6 +113,12 @@ return [
|
||||
'posts_category' => 'Página de Categoria',
|
||||
'posts_category_description' => 'Nome do arquivo de página da categoria para os links de categoria. Esta propriedade é usada pelo componente default parcial.',
|
||||
'posts_post' => 'Página de posts',
|
||||
'posts_post_description' => 'Nome do arquivo post página para os "Saiba mais" links. Esta propriedade é usada pelo componente default parcial.'
|
||||
'posts_post_description' => 'Nome do arquivo post página para os "Saiba mais" links. Esta propriedade é usada pelo componente default parcial.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
'rssfeed_blog' => 'Página do Blog',
|
||||
'rssfeed_blog_description' => 'Nome do arquivo principal da página do blog para geração de links. Essa propriedade é usada pelo componente padrão parcial.',
|
||||
'rssfeed_title' => 'RSS Feed',
|
||||
'rssfeed_description' => 'Gera um feed RSS que contém posts do blog.'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -102,6 +102,8 @@ return [
|
||||
'posts_category' => 'Страница категорий',
|
||||
'posts_category_description' => 'Название категории на странице записи "размещена в категории". Это свойство используется по умолчанию компонентом.',
|
||||
'posts_post' => 'Страница записи',
|
||||
'posts_post_description' => 'Название страницы для ссылки "подробнее". Это свойство используется по умолчанию компонентом.'
|
||||
'posts_post_description' => 'Название страницы для ссылки "подробнее". Это свойство используется по умолчанию компонентом.',
|
||||
'posts_except_post' => 'Except post',
|
||||
'posts_except_post_description' => 'Enter ID/URL or variable with post ID/URL you want to except',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -13,9 +13,11 @@ return [
|
||||
'categories' => 'Kategoriler',
|
||||
'create_category' => 'blog kategorisi',
|
||||
'tab' => 'Blog',
|
||||
'access_posts' => 'Gönderileri yönet',
|
||||
'access_categories' => 'Blog kategorilerini yönet',
|
||||
'access_other_posts' => 'Diğer kullanıcıların gönderilerini yönet',
|
||||
'access_posts' => 'Gönderileri yönetebilsin',
|
||||
'access_categories' => 'Blog kategorilerini yönetebilsin',
|
||||
'access_other_posts' => 'Diğer kullanıcıların gönderilerini yönetebilsin',
|
||||
'access_import_export' => 'Gönderileri içeri/dışarı aktarabilsin',
|
||||
'access_publish' => 'Gönderi yayınlayabilsin',
|
||||
'delete_confirm' => 'Emin misiniz?',
|
||||
'chart_published' => 'Yayınlandı',
|
||||
'chart_drafts' => 'Taslaklar',
|
||||
@@ -25,17 +27,26 @@ return [
|
||||
'list_title' => 'Blog gönderilerini yönet',
|
||||
'filter_category' => 'Kategori',
|
||||
'filter_published' => 'Yayınlananı gizle',
|
||||
'new_post' => 'Yeni gönderi'
|
||||
'filter_date' => 'Tarih',
|
||||
'new_post' => 'Yeni gönderi',
|
||||
'export_post' => 'Gönderileri dışarı aktar',
|
||||
'import_post' => 'Gönderileri içeri aktar',
|
||||
],
|
||||
'post' => [
|
||||
'title' => 'Başlık',
|
||||
'title_placeholder' => 'Yeni gönderi başlığı',
|
||||
'content' => 'İçerik',
|
||||
'content_html' => 'HTML İçeriği',
|
||||
'slug' => 'Kısa URL',
|
||||
'slug_placeholder' => 'new-post-slug',
|
||||
'slug_placeholder' => 'yeni-gonderi-basligi',
|
||||
'categories' => 'Kategoriler',
|
||||
'author_email' => 'Yazar E-mail',
|
||||
'created' => 'Oluşturuldu',
|
||||
'created_date' => 'Oluşturulma tarihi',
|
||||
'updated' => 'Güncellendi',
|
||||
'updated_date' => 'Güncellenme tarihi',
|
||||
'published' => 'Yayınlandı',
|
||||
'published_date' => 'Yayınlanma tarihi',
|
||||
'published_validation' => 'Yayınlanan tarihi belirtiniz',
|
||||
'tab_edit' => 'Düzenle',
|
||||
'tab_categories' => 'Kategoriler',
|
||||
@@ -44,6 +55,7 @@ return [
|
||||
'tab_manage' => 'Yönet',
|
||||
'published_on' => 'Yayınlandı',
|
||||
'excerpt' => 'Alıntı',
|
||||
'summary' => 'Özet',
|
||||
'featured_images' => 'Öne Çıkan Görseller',
|
||||
'delete_confirm' => 'Bu yazıyı silmek istiyor musunuz?',
|
||||
'close_confirm' => 'Gönderi kaydedilmedi.',
|
||||
@@ -56,12 +68,21 @@ return [
|
||||
],
|
||||
'category' => [
|
||||
'name' => 'İsim',
|
||||
'name_placeholder' => 'NYeni kategori adı',
|
||||
'name_placeholder' => 'Yeni kategori adı',
|
||||
'description' => 'Açıklama',
|
||||
'slug' => 'Kısa URL',
|
||||
'slug_placeholder' => 'new-category-slug',
|
||||
'slug_placeholder' => 'yeni-kategori-basligi',
|
||||
'posts' => 'Gönderiler',
|
||||
'delete_confirm' => 'Bu kategoriyi silmek istiyor musunuz?',
|
||||
'return_to_categories' => 'Kategori listesine dön'
|
||||
'return_to_categories' => 'Kategori listesine dön',
|
||||
'reorder' => 'Kategorileri sırala',
|
||||
],
|
||||
'menuitem' => [
|
||||
'blog_category' => 'Blog kategorisi',
|
||||
'all_blog_categories' => 'Tüm blog kategorileri',
|
||||
'blog_post' => 'Blog gönderisi',
|
||||
'all_blog_posts' => 'Tüm blog gönderileri',
|
||||
|
||||
],
|
||||
'settings' => [
|
||||
'category_title' => 'Kategori Listesi',
|
||||
@@ -89,10 +110,16 @@ return [
|
||||
'posts_no_posts' => 'Gönderi mesajı yok',
|
||||
'posts_no_posts_description' => 'Eğer bir gönderi yoksa gönderi listesinde görüntülenecek mesaj. Bu özellik varsayılan kısmi bileşeni tarafından kullanılır.',
|
||||
'posts_order' => 'Gönderi Sırası',
|
||||
'posts_order_description' => 'Attribute on which the posts should be ordered',
|
||||
'posts_order_description' => 'Gönderilerin sıralama türü',
|
||||
'posts_category' => 'Kategori sayfası',
|
||||
'posts_category_description' => 'Name of the category page file for the "Posted into" category links. Bu özellik varsayılan kısmi bileşeni tarafından kullanılır.',
|
||||
'posts_category_description' => '"Yayınlanan" kategori bağlantıları için kategori sayfası dosyasının adı. Bu özellik varsayılan kısmi bileşeni tarafından kullanılır.',
|
||||
'posts_post' => 'Gönderi sayfası',
|
||||
'posts_post_description' => '"Daha fazla bilgi edinin" bağlantıları için gönderi sayfası dosyasının adı. Bu özellik varsayılan kısmi bileşeni tarafından kullanılır.'
|
||||
'posts_post_description' => '"Daha fazla bilgi edinin" bağlantıları için gönderi sayfası dosyasının adı. Bu özellik varsayılan kısmi bileşeni tarafından kullanılır.',
|
||||
'posts_except_post' => 'Harici gönderi',
|
||||
'posts_except_post_description' => 'Hariç tutmak istediğiniz gönderinin ID/URL sini girin',
|
||||
'rssfeed_blog' => 'Blog sayfası',
|
||||
'rssfeed_blog_description' => 'Linkleri üretmek için blog sayfasının adını girin. Bu bilgi, ana component için kullanılacak.',
|
||||
'rssfeed_title' => 'RSS Beslemesi',
|
||||
'rssfeed_description' => 'Blog içerisindeki gönderileri veren RSS beslemesi oluşturur.'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -30,6 +30,8 @@ class Category extends Model
|
||||
*/
|
||||
public $translatable = [
|
||||
'name',
|
||||
'description',
|
||||
['slug', 'index' => true]
|
||||
];
|
||||
|
||||
protected $guarded = [];
|
||||
@@ -45,8 +47,9 @@ class Category extends Model
|
||||
public function beforeValidate()
|
||||
{
|
||||
// Generate a URL slug for this model
|
||||
if (!$this->exists && !$this->slug)
|
||||
if (!$this->exists && !$this->slug) {
|
||||
$this->slug = Str::slug($this->name);
|
||||
}
|
||||
}
|
||||
|
||||
public function afterDelete()
|
||||
@@ -67,7 +70,7 @@ class Category extends Model
|
||||
public function setUrl($pageName, $controller)
|
||||
{
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'id' => $this->id,
|
||||
'slug' => $this->slug,
|
||||
];
|
||||
|
||||
@@ -86,7 +89,7 @@ class Category extends Model
|
||||
* false if omitted.
|
||||
* - dynamicItems - Boolean value indicating whether the item type could generate new menu items.
|
||||
* Optional, false if omitted.
|
||||
* - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to
|
||||
* - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to
|
||||
* resolve the item URL.
|
||||
* @param string $type Specifies the menu item type
|
||||
* @return array Returns an array
|
||||
@@ -169,9 +172,9 @@ class Category extends Model
|
||||
* - url - the menu item URL. Not required for menu item types that return all available records.
|
||||
* The URL should be returned relative to the website root and include the subdirectory, if any.
|
||||
* Use the URL::to() helper to generate the URLs.
|
||||
* - isActive - determines whether the menu item is active. Not required for menu item types that
|
||||
* - isActive - determines whether the menu item is active. Not required for menu item types that
|
||||
* return all available records.
|
||||
* - items - an array of arrays with the same keys (url, isActive, items) + the title key.
|
||||
* - items - an array of arrays with the same keys (url, isActive, items) + the title key.
|
||||
* The items array should be added only if the $item's $nesting property value is TRUE.
|
||||
* @param \RainLab\Pages\Classes\MenuItem $item Specifies the menu item.
|
||||
* @param \Cms\Classes\Theme $theme Specifies the current theme.
|
||||
@@ -184,16 +187,19 @@ class Category extends Model
|
||||
$result = null;
|
||||
|
||||
if ($item->type == 'blog-category') {
|
||||
if (!$item->reference || !$item->cmsPage)
|
||||
if (!$item->reference || !$item->cmsPage) {
|
||||
return;
|
||||
}
|
||||
|
||||
$category = self::find($item->reference);
|
||||
if (!$category)
|
||||
if (!$category) {
|
||||
return;
|
||||
}
|
||||
|
||||
$pageUrl = self::getCategoryPageUrl($item->cmsPage, $category, $theme);
|
||||
if (!$pageUrl)
|
||||
if (!$pageUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
$pageUrl = URL::to($pageUrl);
|
||||
|
||||
@@ -256,7 +262,9 @@ class Category extends Model
|
||||
protected static function getCategoryPageUrl($pageCode, $category, $theme)
|
||||
{
|
||||
$page = CmsPage::loadCached($theme, $pageCode);
|
||||
if (!$page) return;
|
||||
if (!$page) {
|
||||
return;
|
||||
}
|
||||
|
||||
$properties = $page->getComponentProperties('blogPosts');
|
||||
if (!isset($properties['categoryFilter'])) {
|
||||
@@ -276,4 +284,4 @@ class Category extends Model
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
<?php namespace RainLab\Blog\Models;
|
||||
|
||||
use Db;
|
||||
use Url;
|
||||
use App;
|
||||
use Str;
|
||||
use Html;
|
||||
use Lang;
|
||||
use Model;
|
||||
use Markdown;
|
||||
use BackendAuth;
|
||||
use ValidationException;
|
||||
use RainLab\Blog\Classes\TagProcessor;
|
||||
use Backend\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use DB;
|
||||
use Cms\Classes\Page as CmsPage;
|
||||
use Cms\Classes\Theme;
|
||||
|
||||
class Post extends Model
|
||||
{
|
||||
@@ -36,7 +40,8 @@ class Post extends Model
|
||||
'title',
|
||||
'content',
|
||||
'content_html',
|
||||
'excerpt'
|
||||
'excerpt',
|
||||
['slug', 'index' => true]
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -49,7 +54,7 @@ class Post extends Model
|
||||
* The attributes on which the post list can be ordered
|
||||
* @var array
|
||||
*/
|
||||
public static $allowedSortingOptions = array(
|
||||
public static $allowedSortingOptions = [
|
||||
'title asc' => 'Title (ascending)',
|
||||
'title desc' => 'Title (descending)',
|
||||
'created_at asc' => 'Created (ascending)',
|
||||
@@ -59,7 +64,7 @@ class Post extends Model
|
||||
'published_at asc' => 'Published (ascending)',
|
||||
'published_at desc' => 'Published (descending)',
|
||||
'random' => 'Random'
|
||||
);
|
||||
];
|
||||
|
||||
/*
|
||||
* Relations
|
||||
@@ -88,6 +93,28 @@ class Post extends Model
|
||||
|
||||
public $preview = null;
|
||||
|
||||
/**
|
||||
* Limit visibility of the published-button
|
||||
* @return void
|
||||
*/
|
||||
public function filterFields($fields, $context = null)
|
||||
{
|
||||
if (!isset($fields->published, $fields->published_at)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$user = BackendAuth::getUser();
|
||||
|
||||
if (!$user->hasAnyAccess(['rainlab.blog.access_publish'])) {
|
||||
$fields->published->hidden = true;
|
||||
$fields->published_at->hidden = true;
|
||||
}
|
||||
else {
|
||||
$fields->published->hidden = false;
|
||||
$fields->published_at->hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function afterValidate()
|
||||
{
|
||||
if ($this->published && !$this->published_at) {
|
||||
@@ -110,7 +137,7 @@ class Post extends Model
|
||||
public function setUrl($pageName, $controller)
|
||||
{
|
||||
$params = [
|
||||
'id' => $this->id,
|
||||
'id' => $this->id,
|
||||
'slug' => $this->slug,
|
||||
];
|
||||
|
||||
@@ -118,6 +145,13 @@ class Post extends Model
|
||||
$params['category'] = $this->categories->count() ? $this->categories->first()->slug : null;
|
||||
}
|
||||
|
||||
//expose published year, month and day as URL parameters
|
||||
if ($this->published) {
|
||||
$params['year'] = $this->published_at->format('Y');
|
||||
$params['month'] = $this->published_at->format('m');
|
||||
$params['day'] = $this->published_at->format('d');
|
||||
}
|
||||
|
||||
return $this->url = $controller->pageUrl($pageName, $params);
|
||||
}
|
||||
|
||||
@@ -176,7 +210,8 @@ class Post extends Model
|
||||
'categories' => null,
|
||||
'category' => null,
|
||||
'search' => '',
|
||||
'published' => true
|
||||
'published' => true,
|
||||
'exceptPost' => null,
|
||||
], $options));
|
||||
|
||||
$searchableFields = ['title', 'slug', 'excerpt', 'content'];
|
||||
@@ -185,6 +220,18 @@ class Post extends Model
|
||||
$query->isPublished();
|
||||
}
|
||||
|
||||
/*
|
||||
* Ignore a post
|
||||
*/
|
||||
if ($exceptPost) {
|
||||
if (is_numeric($exceptPost)) {
|
||||
$query->where('id', '<>', $exceptPost);
|
||||
}
|
||||
else {
|
||||
$query->where('slug', '<>', $exceptPost);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
@@ -201,7 +248,7 @@ class Post extends Model
|
||||
}
|
||||
list($sortField, $sortDirection) = $parts;
|
||||
if ($sortField == 'random') {
|
||||
$sortField = DB::raw('RAND()');
|
||||
$sortField = Db::raw('RAND()');
|
||||
}
|
||||
$query->orderBy($sortField, $sortDirection);
|
||||
}
|
||||
@@ -263,7 +310,13 @@ class Post extends Model
|
||||
*/
|
||||
public function getHasSummaryAttribute()
|
||||
{
|
||||
return strlen($this->getSummaryAttribute()) < strlen($this->content_html);
|
||||
$more = '<!-- more -->';
|
||||
|
||||
return (
|
||||
!!strlen(trim($this->excerpt)) ||
|
||||
strpos($this->content_html, $more) !== false ||
|
||||
strlen(Html::strip($this->content_html)) > 600
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +328,7 @@ class Post extends Model
|
||||
*/
|
||||
public function getSummaryAttribute()
|
||||
{
|
||||
$excerpt = array_get($this->attributes, 'excerpt');
|
||||
$excerpt = $this->excerpt;
|
||||
if (strlen(trim($excerpt))) {
|
||||
return $excerpt;
|
||||
}
|
||||
@@ -286,6 +339,200 @@ class Post extends Model
|
||||
return array_get($parts, 0);
|
||||
}
|
||||
|
||||
return Str::limit(Html::strip($this->content_html), 600);
|
||||
return Html::limit($this->content_html, 600);
|
||||
}
|
||||
|
||||
//
|
||||
// Next / Previous
|
||||
//
|
||||
|
||||
/**
|
||||
* Returns the next post, if available.
|
||||
* @return self
|
||||
*/
|
||||
public function nextPost()
|
||||
{
|
||||
return self::isPublished()
|
||||
->where('id', '>' , $this->id)
|
||||
->orderBy('id', 'asc')
|
||||
->first()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the previous post, if available.
|
||||
* @return self
|
||||
*/
|
||||
public function previousPost()
|
||||
{
|
||||
return self::isPublished()
|
||||
->where('id', '<' , $this->id)
|
||||
->orderBy('id', 'desc')
|
||||
->first()
|
||||
;
|
||||
}
|
||||
|
||||
//
|
||||
// Menu helpers
|
||||
//
|
||||
|
||||
/**
|
||||
* Handler for the pages.menuitem.getTypeInfo event.
|
||||
* Returns a menu item type information. The type information is returned as array
|
||||
* with the following elements:
|
||||
* - references - a list of the item type reference options. The options are returned in the
|
||||
* ["key"] => "title" format for options that don't have sub-options, and in the format
|
||||
* ["key"] => ["title"=>"Option title", "items"=>[...]] for options that have sub-options. Optional,
|
||||
* required only if the menu item type requires references.
|
||||
* - nesting - Boolean value indicating whether the item type supports nested items. Optional,
|
||||
* false if omitted.
|
||||
* - dynamicItems - Boolean value indicating whether the item type could generate new menu items.
|
||||
* Optional, false if omitted.
|
||||
* - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to
|
||||
* resolve the item URL.
|
||||
* @param string $type Specifies the menu item type
|
||||
* @return array Returns an array
|
||||
*/
|
||||
public static function getMenuTypeInfo($type)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
if ($type == 'blog-post') {
|
||||
|
||||
$references = [];
|
||||
$posts = self::orderBy('title')->get();
|
||||
foreach ($posts as $post) {
|
||||
$references[$post->id] = $post->title;
|
||||
}
|
||||
|
||||
$result = [
|
||||
'references' => $references,
|
||||
'nesting' => false,
|
||||
'dynamicItems' => false
|
||||
];
|
||||
}
|
||||
|
||||
if ($type == 'all-blog-posts') {
|
||||
$result = [
|
||||
'dynamicItems' => true
|
||||
];
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$theme = Theme::getActiveTheme();
|
||||
|
||||
$pages = CmsPage::listInTheme($theme, true);
|
||||
$cmsPages = [];
|
||||
|
||||
foreach ($pages as $page) {
|
||||
if (!$page->hasComponent('blogPost')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Component must use a categoryPage filter with a routing parameter and post slug
|
||||
* eg: categoryPage = "{{ :somevalue }}", slug = "{{ :somevalue }}"
|
||||
*/
|
||||
$properties = $page->getComponentProperties('blogPost');
|
||||
if (!isset($properties['categoryPage']) || !preg_match('/{{\s*:/', $properties['slug'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$cmsPages[] = $page;
|
||||
}
|
||||
|
||||
$result['cmsPages'] = $cmsPages;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for the pages.menuitem.resolveItem event.
|
||||
* Returns information about a menu item. The result is an array
|
||||
* with the following keys:
|
||||
* - url - the menu item URL. Not required for menu item types that return all available records.
|
||||
* The URL should be returned relative to the website root and include the subdirectory, if any.
|
||||
* Use the Url::to() helper to generate the URLs.
|
||||
* - isActive - determines whether the menu item is active. Not required for menu item types that
|
||||
* return all available records.
|
||||
* - items - an array of arrays with the same keys (url, isActive, items) + the title key.
|
||||
* The items array should be added only if the $item's $nesting property value is TRUE.
|
||||
* @param \RainLab\Pages\Classes\MenuItem $item Specifies the menu item.
|
||||
* @param \Cms\Classes\Theme $theme Specifies the current theme.
|
||||
* @param string $url Specifies the current page URL, normalized, in lower case
|
||||
* The URL is specified relative to the website root, it includes the subdirectory name, if any.
|
||||
* @return mixed Returns an array. Returns null if the item cannot be resolved.
|
||||
*/
|
||||
public static function resolveMenuItem($item, $url, $theme)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($item->type == 'blog-post') {
|
||||
if (!$item->reference || !$item->cmsPage)
|
||||
return;
|
||||
|
||||
$category = self::find($item->reference);
|
||||
if (!$category)
|
||||
return;
|
||||
|
||||
$pageUrl = self::getPostPageUrl($item->cmsPage, $category, $theme);
|
||||
if (!$pageUrl)
|
||||
return;
|
||||
|
||||
$pageUrl = Url::to($pageUrl);
|
||||
|
||||
$result = [];
|
||||
$result['url'] = $pageUrl;
|
||||
$result['isActive'] = $pageUrl == $url;
|
||||
$result['mtime'] = $category->updated_at;
|
||||
}
|
||||
elseif ($item->type == 'all-blog-posts') {
|
||||
$result = [
|
||||
'items' => []
|
||||
];
|
||||
|
||||
$posts = self::orderBy('title')->get();
|
||||
foreach ($posts as $post) {
|
||||
$postItem = [
|
||||
'title' => $post->title,
|
||||
'url' => self::getPostPageUrl($item->cmsPage, $post, $theme),
|
||||
'mtime' => $post->updated_at,
|
||||
];
|
||||
|
||||
$postItem['isActive'] = $postItem['url'] == $url;
|
||||
|
||||
$result['items'][] = $postItem;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns URL of a post page.
|
||||
*/
|
||||
protected static function getPostPageUrl($pageCode, $category, $theme)
|
||||
{
|
||||
$page = CmsPage::loadCached($theme, $pageCode);
|
||||
if (!$page) return;
|
||||
|
||||
$properties = $page->getComponentProperties('blogPost');
|
||||
if (!isset($properties['slug'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract the routing parameter name from the category filter
|
||||
* eg: {{ :someRouteParam }}
|
||||
*/
|
||||
if (!preg_match('/^\{\{([^\}]+)\}\}$/', $properties['slug'], $matches)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$paramName = substr(trim($matches[1]), 1);
|
||||
$url = CmsPage::url($page->getBaseFileName(), [$paramName => $category->slug]);
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,13 +54,19 @@ class PostExport extends ExportModel
|
||||
|
||||
public function getAuthorEmailAttribute()
|
||||
{
|
||||
if (!$this->post_user) return '';
|
||||
if (!$this->post_user) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->post_user->email;
|
||||
}
|
||||
|
||||
public function getCategoriesAttribute()
|
||||
{
|
||||
if (!$this->post_categories) return '';
|
||||
if (!$this->post_categories) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->encodeArrayValue($this->post_categories->lists('name'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
use Backend\Models\ImportModel;
|
||||
use Backend\Models\User as AuthorModel;
|
||||
use ApplicationException;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Post Import Model
|
||||
@@ -15,8 +16,8 @@ class PostImport extends ImportModel
|
||||
* Validation rules
|
||||
*/
|
||||
public $rules = [
|
||||
'title' => 'required',
|
||||
'content' => 'required',
|
||||
'title' => 'required',
|
||||
'content' => 'required'
|
||||
];
|
||||
|
||||
protected $authorEmailCache = [];
|
||||
@@ -139,7 +140,9 @@ class PostImport extends ImportModel
|
||||
$categoryNames = $this->decodeArrayValue(array_get($data, 'categories'));
|
||||
|
||||
foreach ($categoryNames as $name) {
|
||||
if (!$name = trim($name)) continue;
|
||||
if (!$name = trim($name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($this->categoryNameCache[$name])) {
|
||||
$ids[] = $this->categoryNameCache[$name];
|
||||
@@ -156,5 +159,4 @@ class PostImport extends ImportModel
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,3 +14,10 @@ fields:
|
||||
span: right
|
||||
placeholder: rainlab.blog::lang.category.slug_placeholder
|
||||
preset: name
|
||||
|
||||
description:
|
||||
label: 'rainlab.blog::lang.category.description'
|
||||
size: large
|
||||
oc.commentPosition: ''
|
||||
span: full
|
||||
type: textarea
|
||||
|
||||
@@ -16,8 +16,8 @@ class CreatePostsTable extends Migration
|
||||
$table->string('title')->nullable();
|
||||
$table->string('slug')->index();
|
||||
$table->text('excerpt')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->text('content_html')->nullable();
|
||||
$table->longText('content')->nullable();
|
||||
$table->longText('content_html')->nullable();
|
||||
$table->timestamp('published_at')->nullable();
|
||||
$table->boolean('published')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<?php namespace RainLab\Blog\Updates;
|
||||
|
||||
use Schema;
|
||||
use DbDongle;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
use DbDongle;
|
||||
|
||||
class UpdateTimestampsNullable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
DbDongle::disableStrictMode();
|
||||
@@ -19,5 +17,4 @@ class UpdateTimestampsNullable extends Migration
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,3 +34,10 @@
|
||||
1.2.7: Introduced a new RSS feed component.
|
||||
1.2.8: Fixes issue with translated `content_html` attribute on blog posts.
|
||||
1.2.9: Added translation support for blog categories.
|
||||
1.2.10: Added translation support for post slugs.
|
||||
1.2.11: Fixes bug where excerpt is not translated.
|
||||
1.2.12: Description field added to category form.
|
||||
1.2.13: Improved support for Static Pages menus, added a blog post and all blog posts.
|
||||
1.2.14: Added post exception property to the post list component, useful for showing related posts.
|
||||
1.2.15: Back-end navigation sort order updated.
|
||||
1.2.16: Added `nextPost` and `previousPost` to the blog post component.
|
||||
|
||||
2
plugins/rainlab/blog/vendor/autoload.php
vendored
2
plugins/rainlab/blog/vendor/autoload.php
vendored
@@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit0280b54f3bf08936c3a0a8a8870678c2::getLoader();
|
||||
return ComposerAutoloaderInit94e11ce830bb2f7241fe3638d5fc7d07::getLoader();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit0280b54f3bf08936c3a0a8a8870678c2
|
||||
class ComposerAutoloaderInit94e11ce830bb2f7241fe3638d5fc7d07
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit0280b54f3bf08936c3a0a8a8870678c2
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0280b54f3bf08936c3a0a8a8870678c2', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit94e11ce830bb2f7241fe3638d5fc7d07', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0280b54f3bf08936c3a0a8a8870678c2', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit94e11ce830bb2f7241fe3638d5fc7d07', 'loadClassLoader'));
|
||||
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
[
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v1.1.0",
|
||||
"version_normalized": "1.1.0.0",
|
||||
"version": "v1.2.0",
|
||||
"version_normalized": "1.2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "a3595c5272a6f247228abb20076ed27321e4aae9"
|
||||
"reference": "d78064c68299743e0161004f2de3a0204e33b804"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/a3595c5272a6f247228abb20076ed27321e4aae9",
|
||||
"reference": "a3595c5272a6f247228abb20076ed27321e4aae9",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
|
||||
"reference": "d78064c68299743e0161004f2de3a0204e33b804",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"composer/composer": "1.0.*@dev",
|
||||
"phpunit/phpunit": "4.1.*"
|
||||
},
|
||||
"time": "2016-07-05 06:18:20",
|
||||
"time": "2016-08-13 20:53:52",
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "Composer\\Installers\\Plugin",
|
||||
@@ -60,6 +60,7 @@
|
||||
"MODX Evo",
|
||||
"Mautic",
|
||||
"OXID",
|
||||
"Plentymarkets",
|
||||
"RadPHP",
|
||||
"SMF",
|
||||
"Thelia",
|
||||
@@ -67,9 +68,11 @@
|
||||
"agl",
|
||||
"aimeos",
|
||||
"annotatecms",
|
||||
"attogram",
|
||||
"bitrix",
|
||||
"cakephp",
|
||||
"chef",
|
||||
"cockpit",
|
||||
"codeigniter",
|
||||
"concrete5",
|
||||
"croogo",
|
||||
@@ -93,12 +96,14 @@
|
||||
"piwik",
|
||||
"ppi",
|
||||
"puppet",
|
||||
"reindex",
|
||||
"roundcube",
|
||||
"shopware",
|
||||
"silverstripe",
|
||||
"symfony",
|
||||
"typo3",
|
||||
"wordpress",
|
||||
"yawik",
|
||||
"zend",
|
||||
"zikula"
|
||||
]
|
||||
|
||||
@@ -35,6 +35,7 @@ is not needed to install packages with these frameworks:
|
||||
| --------- | -----
|
||||
| Aimeos | `aimeos-extension`
|
||||
| Asgard | `asgard-module`<br>`asgard-theme`
|
||||
| Attogram | `attogram-module`
|
||||
| AGL | `agl-module`
|
||||
| Bonefish | `bonefish-package`
|
||||
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
|
||||
@@ -42,6 +43,7 @@ is not needed to install packages with these frameworks:
|
||||
| CakePHP 2+ | **`cakephp-plugin`**
|
||||
| Chef | `chef-cookbook`<br>`chef-role`
|
||||
| CCFramework | `ccframework-ship`<br>`ccframework-theme`
|
||||
| Cockpit | `cockpit-module`
|
||||
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
|
||||
| concrete5 | `concrete5-block`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-update`
|
||||
| Craft | `craft-plugin`
|
||||
@@ -75,20 +77,24 @@ is not needed to install packages with these frameworks:
|
||||
| Piwik | `piwik-plugin`
|
||||
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
|
||||
| Pimcore | `pimcore-plugin`
|
||||
| Plentymarkets | `plentymarkets-plugin`
|
||||
| PPI | **`ppi-module`**
|
||||
| Puppet | `puppet-module`
|
||||
| RadPHP | `radphp-bundle`
|
||||
| REDAXO | `redaxo-addon`
|
||||
| ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
|
||||
| Roundcube | `roundcube-plugin`
|
||||
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`
|
||||
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
|
||||
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
|
||||
| SMF | `smf-module`<br>`smf-theme`
|
||||
| symfony1 | **`symfony1-plugin`**
|
||||
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
|
||||
| TYPO3 Flow | `typo3-flow-package`<br>`typo3-flow-framework`<br>`typo3-flow-plugin`<br>`typo3-flow-site`<br>`typo3-flow-boilerplate`<br>`typo3-flow-build`
|
||||
| TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
|
||||
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
|
||||
| Wolf CMS | `wolfcms-plugin`
|
||||
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`
|
||||
| YAWIK | `yawik-module`
|
||||
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
|
||||
| Zikula | `zikula-module`<br>`zikula-theme`
|
||||
| Prestashop | `prestashop-module`<br>`prestashop-theme`
|
||||
@@ -187,7 +193,7 @@ not be inflected.
|
||||
## Contribute!
|
||||
|
||||
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
|
||||
* Run the command `php composer.phar install` to install the dependencies.
|
||||
* Run the command `php composer.phar install` to install the dependencies.
|
||||
This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install).
|
||||
* Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
|
||||
* Create a branch, commit, push and send us a
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
"Aimeos",
|
||||
"AGL",
|
||||
"AnnotateCms",
|
||||
"Attogram",
|
||||
"Bitrix",
|
||||
"CakePHP",
|
||||
"Chef",
|
||||
"Cockpit",
|
||||
"CodeIgniter",
|
||||
"concrete5",
|
||||
"Craft",
|
||||
@@ -38,9 +40,11 @@
|
||||
"Moodle",
|
||||
"Piwik",
|
||||
"phpBB",
|
||||
"Plentymarkets",
|
||||
"PPI",
|
||||
"Puppet",
|
||||
"RadPHP",
|
||||
"ReIndex",
|
||||
"Roundcube",
|
||||
"shopware",
|
||||
"SilverStripe",
|
||||
@@ -50,6 +54,7 @@
|
||||
"TYPO3",
|
||||
"WolfCMS",
|
||||
"WordPress",
|
||||
"YAWIK",
|
||||
"Zend",
|
||||
"Zikula"
|
||||
],
|
||||
|
||||
@@ -31,14 +31,18 @@ class AsgardInstaller extends BaseInstaller
|
||||
|
||||
protected function inflectPluginVars($vars)
|
||||
{
|
||||
$vars['name'] = ucfirst(preg_replace('/-module/', '', $vars['name']));
|
||||
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function inflectThemeVars($vars)
|
||||
{
|
||||
$vars['name'] = ucfirst(preg_replace('/-theme$/', '', $vars['name']));
|
||||
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class AttogramInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'modules/{$name}/',
|
||||
);
|
||||
}
|
||||
34
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
vendored
Normal file
34
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class CockpitInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'cockpit/modules/addons/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format module name.
|
||||
*
|
||||
* Strip `module-` prefix from package name.
|
||||
*
|
||||
* @param array @vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
if ($vars['type'] == 'cockpit-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public function inflectModuleVars($vars)
|
||||
{
|
||||
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,8 @@ class ExpressionEngineInstaller extends BaseInstaller
|
||||
protected $locations = array();
|
||||
|
||||
private $ee2Locations = array(
|
||||
'addon' => 'system/expressionengine/third-party/{$name}/',
|
||||
'theme' => 'themes/third-party/{$name}/',
|
||||
'addon' => 'system/expressionengine/third_party/{$name}/',
|
||||
'theme' => 'themes/third_party/{$name}/',
|
||||
);
|
||||
|
||||
private $ee3Locations = array(
|
||||
|
||||
@@ -16,6 +16,7 @@ class Installer extends LibraryInstaller
|
||||
private $supportedTypes = array(
|
||||
'aimeos' => 'AimeosInstaller',
|
||||
'asgard' => 'AsgardInstaller',
|
||||
'attogram' => 'AttogramInstaller',
|
||||
'agl' => 'AglInstaller',
|
||||
'annotatecms' => 'AnnotateCmsInstaller',
|
||||
'bitrix' => 'BitrixInstaller',
|
||||
@@ -23,6 +24,7 @@ class Installer extends LibraryInstaller
|
||||
'cakephp' => 'CakePHPInstaller',
|
||||
'chef' => 'ChefInstaller',
|
||||
'ccframework' => 'ClanCatsFrameworkInstaller',
|
||||
'cockpit' => 'CockpitInstaller',
|
||||
'codeigniter' => 'CodeIgniterInstaller',
|
||||
'concrete5' => 'Concrete5Installer',
|
||||
'craft' => 'CraftInstaller',
|
||||
@@ -49,7 +51,7 @@ class Installer extends LibraryInstaller
|
||||
'mako' => 'MakoInstaller',
|
||||
'mautic' => 'MauticInstaller',
|
||||
'mediawiki' => 'MediaWikiInstaller',
|
||||
'microweber' => 'MicroweberInstaller',
|
||||
'microweber' => 'MicroweberInstaller',
|
||||
'modulework' => 'MODULEWorkInstaller',
|
||||
'modxevo' => 'MODXEvoInstaller',
|
||||
'moodle' => 'MoodleInstaller',
|
||||
@@ -58,11 +60,13 @@ class Installer extends LibraryInstaller
|
||||
'phpbb' => 'PhpBBInstaller',
|
||||
'pimcore' => 'PimcoreInstaller',
|
||||
'piwik' => 'PiwikInstaller',
|
||||
'plentymarkets'=> 'PlentymarketsInstaller',
|
||||
'ppi' => 'PPIInstaller',
|
||||
'puppet' => 'PuppetInstaller',
|
||||
'radphp' => 'RadPHPInstaller',
|
||||
'phifty' => 'PhiftyInstaller',
|
||||
'redaxo' => 'RedaxoInstaller',
|
||||
'reindex' => 'ReIndexInstaller',
|
||||
'roundcube' => 'RoundcubeInstaller',
|
||||
'shopware' => 'ShopwareInstaller',
|
||||
'silverstripe' => 'SilverStripeInstaller',
|
||||
@@ -72,9 +76,11 @@ class Installer extends LibraryInstaller
|
||||
'tusk' => 'TuskInstaller',
|
||||
'typo3-cms' => 'TYPO3CmsInstaller',
|
||||
'typo3-flow' => 'TYPO3FlowInstaller',
|
||||
'vanilla' => 'VanillaInstaller',
|
||||
'whmcs' => 'WHMCSInstaller',
|
||||
'wolfcms' => 'WolfCMSInstaller',
|
||||
'wordpress' => 'WordPressInstaller',
|
||||
'yawik' => 'YawikInstaller',
|
||||
'zend' => 'ZendInstaller',
|
||||
'zikula' => 'ZikulaInstaller',
|
||||
'prestashop' => 'PrestashopInstaller'
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class PlentymarketsInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => '{$name}/'
|
||||
);
|
||||
|
||||
/**
|
||||
* Remove hyphen, "plugin" and format to camelcase
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = explode("-", $vars['name']);
|
||||
foreach ($vars['name'] as $key => $name) {
|
||||
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
||||
if (strcasecmp($name, "Plugin") == 0) {
|
||||
unset($vars['name'][$key]);
|
||||
}
|
||||
}
|
||||
$vars['name'] = implode("",$vars['name']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
10
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendored
Normal file
10
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ReIndexInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'theme' => 'themes/{$name}/',
|
||||
'plugin' => 'plugins/{$name}/'
|
||||
);
|
||||
}
|
||||
@@ -11,7 +11,9 @@ class ShopwareInstaller extends BaseInstaller
|
||||
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
||||
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
||||
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
||||
'theme' => 'templates/{$name}/'
|
||||
'theme' => 'templates/{$name}/',
|
||||
'plugin' => 'custom/plugins/{$name}/',
|
||||
'frontend-theme' => 'themes/Frontend/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
10
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
vendored
Normal file
10
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Composer\Installers;
|
||||
|
||||
class VanillaInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'plugin' => 'plugins/{$name}/',
|
||||
'theme' => 'themes/{$name}/',
|
||||
);
|
||||
}
|
||||
32
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
vendored
Normal file
32
plugins/rainlab/blog/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: cbleek
|
||||
* Date: 25.03.16
|
||||
* Time: 20:55
|
||||
*/
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
|
||||
class YawikInstaller extends BaseInstaller
|
||||
{
|
||||
protected $locations = array(
|
||||
'module' => 'module/{$name}/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Format package name to CamelCase
|
||||
* @param array $vars
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function inflectPackageVars($vars)
|
||||
{
|
||||
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ use Composer\Composer;
|
||||
class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var OctoberInstaller
|
||||
* @var AsgardInstaller
|
||||
*/
|
||||
private $installer;
|
||||
|
||||
@@ -26,14 +26,20 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
|
||||
public function testInflectPackageVars($type, $name, $expected)
|
||||
{
|
||||
$this->assertEquals(
|
||||
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
|
||||
array('name' => $expected, 'type' => $type)
|
||||
array('name' => $expected, 'type' => $type),
|
||||
$this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
|
||||
);
|
||||
}
|
||||
|
||||
public function packageNameInflectionProvider()
|
||||
{
|
||||
return array(
|
||||
// Should keep module name StudlyCase
|
||||
array(
|
||||
'asgard-module',
|
||||
'user-profile',
|
||||
'UserProfile'
|
||||
),
|
||||
array(
|
||||
'asgard-module',
|
||||
'asgard-module',
|
||||
@@ -44,11 +50,17 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
|
||||
'blog',
|
||||
'Blog'
|
||||
),
|
||||
// tests that exactly one '-module' is cut off
|
||||
array(
|
||||
'asgard-module',
|
||||
'some-module-module',
|
||||
'SomeModule',
|
||||
),
|
||||
// tests that exactly one '-theme' is cut off
|
||||
array(
|
||||
'asgard-theme',
|
||||
'some-theme-theme',
|
||||
'Some-theme',
|
||||
'SomeTheme',
|
||||
),
|
||||
// tests that names without '-theme' suffix stay valid
|
||||
array(
|
||||
@@ -56,6 +68,12 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
|
||||
'someothertheme',
|
||||
'Someothertheme',
|
||||
),
|
||||
// Should keep theme name StudlyCase
|
||||
array(
|
||||
'asgard-theme',
|
||||
'adminlte-advanced',
|
||||
'AdminlteAdvanced'
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers\Test;
|
||||
|
||||
use Composer\Installers\BitrixInstaller;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Package\Package;
|
||||
use Composer\Composer;
|
||||
|
||||
/**
|
||||
* Tests for the BitrixInstaller Class
|
||||
*
|
||||
* @coversDefaultClass Composer\Installers\BitrixInstaller
|
||||
*/
|
||||
class BitrixInstallerTest extends TestCase
|
||||
{
|
||||
/** @var BitrixInstaller */
|
||||
private $installer;
|
||||
|
||||
/** @var Composer */
|
||||
private $composer;
|
||||
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, instantiate the class-under-test.
|
||||
*
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
final function setUp()
|
||||
{
|
||||
$this->composer = new Composer();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $vars
|
||||
* @param string $expectedVars
|
||||
*
|
||||
* @covers ::inflectPackageVars
|
||||
*
|
||||
* @dataProvider provideExpectedInflectionResults
|
||||
*/
|
||||
final public function testInflectPackageVars($vars, $expectedVars)
|
||||
{
|
||||
|
||||
$this->installer = new BitrixInstaller(
|
||||
new Package($vars['name'], '4.2', '4.2'),
|
||||
$this->composer
|
||||
);
|
||||
$actual = $this->installer->inflectPackageVars($vars);
|
||||
$this->assertEquals($actual, $expectedVars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides various parameters for packages and the expected result after inflection
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
final public function provideExpectedInflectionResults()
|
||||
{
|
||||
return array(
|
||||
//check bitrix-dir is correct
|
||||
array(
|
||||
array('name' => 'Nyan/Cat'),
|
||||
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
|
||||
),
|
||||
array(
|
||||
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix'),
|
||||
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
|
||||
),
|
||||
array(
|
||||
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local'),
|
||||
array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local')
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,7 @@ class InstallerTest extends TestCase
|
||||
array('annotatecms-module', true),
|
||||
array('annotatecms-component', true),
|
||||
array('annotatecms-service', true),
|
||||
array('attogram-module', true),
|
||||
array('bitrix-module', true),
|
||||
array('bitrix-component', true),
|
||||
array('bitrix-theme', true),
|
||||
@@ -99,6 +100,7 @@ class InstallerTest extends TestCase
|
||||
array('cakephp-plugin', true),
|
||||
array('chef-cookbook', true),
|
||||
array('chef-role', true),
|
||||
array('cockpit-module', true),
|
||||
array('codeigniter-app', false),
|
||||
array('codeigniter-library', true),
|
||||
array('codeigniter-third-party', true),
|
||||
@@ -151,6 +153,7 @@ class InstallerTest extends TestCase
|
||||
array('piwik-plugin', true),
|
||||
array('phpbb-extension', true),
|
||||
array('pimcore-plugin', true),
|
||||
array('plentymarkets-plugin', true),
|
||||
array('ppi-module', true),
|
||||
array('prestashop-module', true),
|
||||
array('prestashop-theme', true),
|
||||
@@ -158,11 +161,15 @@ class InstallerTest extends TestCase
|
||||
array('radphp-bundle', true),
|
||||
array('redaxo-addon', true),
|
||||
array('redaxo-bestyle-plugin', true),
|
||||
array('reindex-theme', true),
|
||||
array('reindex-plugin', true),
|
||||
array('roundcube-plugin', true),
|
||||
array('shopware-backend-plugin', true),
|
||||
array('shopware-core-plugin', true),
|
||||
array('shopware-frontend-plugin', true),
|
||||
array('shopware-theme', true),
|
||||
array('shopware-plugin', true),
|
||||
array('shopware-frontend-theme', true),
|
||||
array('silverstripe-module', true),
|
||||
array('silverstripe-theme', true),
|
||||
array('smf-module', true),
|
||||
@@ -176,10 +183,13 @@ class InstallerTest extends TestCase
|
||||
array('tusk-asset', true),
|
||||
array('typo3-flow-plugin', true),
|
||||
array('typo3-cms-extension', true),
|
||||
array('vanilla-plugin', true),
|
||||
array('vanilla-theme', true),
|
||||
array('whmcs-gateway', true),
|
||||
array('wolfcms-plugin', true),
|
||||
array('wordpress-plugin', true),
|
||||
array('wordpress-core', false),
|
||||
array('yawik-module', true),
|
||||
array('zend-library', true),
|
||||
array('zikula-module', true),
|
||||
array('zikula-theme', true),
|
||||
@@ -217,6 +227,7 @@ class InstallerTest extends TestCase
|
||||
array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
|
||||
array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
|
||||
array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
|
||||
array('attogram-module', 'modules/my_module/', 'author/my_module'),
|
||||
array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'),
|
||||
array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'),
|
||||
array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'),
|
||||
@@ -227,6 +238,7 @@ class InstallerTest extends TestCase
|
||||
array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
|
||||
array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),
|
||||
array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'),
|
||||
array('cockpit-module', 'cockpit/modules/addons/My_module/', 'piotr-cz/cockpit-my_module'),
|
||||
array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
|
||||
array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
|
||||
array('concrete5-block', 'blocks/concrete5_block/', 'remo/concrete5_block'),
|
||||
@@ -247,8 +259,8 @@ class InstallerTest extends TestCase
|
||||
array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
|
||||
array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'),
|
||||
array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'),
|
||||
array('ee2-addon', 'system/expressionengine/third-party/ee_theme/', 'author/ee_theme'),
|
||||
array('ee2-theme', 'themes/third-party/ee_package/', 'author/ee_package'),
|
||||
array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'),
|
||||
array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'),
|
||||
array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
|
||||
array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
|
||||
array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'),
|
||||
@@ -289,17 +301,22 @@ class InstallerTest extends TestCase
|
||||
array('phpbb-style', 'styles/foo/', 'test/foo'),
|
||||
array('phpbb-language', 'language/foo/', 'test/foo'),
|
||||
array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'),
|
||||
array('plentymarkets-plugin', 'HelloWorld/', 'plugin-hello-world'),
|
||||
array('ppi-module', 'modules/foo/', 'test/foo'),
|
||||
array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'),
|
||||
array('radphp-bundle', 'src/Migration/', 'atkrad/migration'),
|
||||
array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'),
|
||||
array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'),
|
||||
array('reindex-theme', 'themes/my_module/', 'author/my_module'),
|
||||
array('reindex-plugin', 'plugins/my_module/', 'author/my_module'),
|
||||
array('roundcube-plugin', 'plugins/base/', 'test/base'),
|
||||
array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'),
|
||||
array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
|
||||
array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
|
||||
array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
|
||||
array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
|
||||
array('shopware-frontend-theme', 'themes/Frontend/ShamaMyFrontendTheme/', 'shama/my-frontend-theme'),
|
||||
array('shopware-plugin', 'custom/plugins/ShamaMyPlugin/', 'shama/my-plugin'),
|
||||
array('silverstripe-module', 'my_module/', 'shama/my_module'),
|
||||
array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
|
||||
array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
|
||||
@@ -318,6 +335,8 @@ class InstallerTest extends TestCase
|
||||
array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
|
||||
array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
|
||||
array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
|
||||
array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
|
||||
array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'),
|
||||
array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'),
|
||||
array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
|
||||
array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
|
||||
@@ -330,6 +349,7 @@ class InstallerTest extends TestCase
|
||||
array('phifty-bundle', 'bundles/core/', 'shama/core'),
|
||||
array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'),
|
||||
array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'),
|
||||
array('yawik-module', 'module/MyModule/', 'shama/my_module'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
namespace Composer\Installers\Test;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\Installers\YawikInstaller;
|
||||
use Composer\Package\Package;
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
/**
|
||||
* Class YawikInstallerTest
|
||||
*
|
||||
* @package Composer\Installers\Test
|
||||
*/
|
||||
class YawikInstallerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @varComposer
|
||||
*/
|
||||
private $composer;
|
||||
|
||||
/**
|
||||
* @var PackageInterface
|
||||
*/
|
||||
private $io;
|
||||
|
||||
/**
|
||||
* @var Package
|
||||
*/
|
||||
private $package;
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->package = new Package('YawikCompanyRegistration', '1.0', '1.0');
|
||||
$this->io = $this->getMock('Composer\IO\PackageInterface');
|
||||
$this->composer = new Composer();
|
||||
}
|
||||
|
||||
/**
|
||||
* testInflectPackageVars
|
||||
*
|
||||
* @dataProvider packageNameProvider
|
||||
* @return void
|
||||
*/
|
||||
public function testInflectPackageVars($input)
|
||||
{
|
||||
$installer = new YawikInstaller($this->package, $this->composer);
|
||||
$result = $installer->inflectPackageVars(array('name' => $input));
|
||||
$this->assertEquals($result, array('name' => 'YawikCompanyRegistration'));
|
||||
}
|
||||
|
||||
public function packageNameProvider()
|
||||
{
|
||||
return array(
|
||||
array('yawik-company-registration'),
|
||||
array('yawik_company_registration'),
|
||||
array('YawikCompanyRegistration')
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user