c33s / core-bundle
everything to quickstart a webpage
Installs: 825
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 2
Open Issues: 0
Language:HTML
Type:symfony-bundle
Requires
- php: >=5.3.3
- afarkas/html5shiv: ~3.7.2
- braincrafted/bootstrap-bundle: 2.1.0
- c33s/attachment-bundle: ~0.6.0
- c33s/contact-form-bundle: ~0.5.0
- c33s/menu-bundle: ~0.10.1
- c33s/simple-content-bundle: ~0.12.0
- c33s/static-page-content-bundle: ~2.0.0
- cocur/human-date: ~0.1
- cocur/slugify: ~1.4.1
- components/font-awesome: ~4.1.0
- components/jquery: ~1.11
- components/jquery-cookie: ~1.4.1
- components/jqueryui: ~1.11
- fkr/cssurlrewrite-bundle: ~1.0.0
- friendsofsymfony/user-bundle: ~1.3.5
- guzzle/guzzle: ~3.8.1
- havvg/propel-boolean-extra-behavior: ~1.1.2
- jaysalvat/vegas: 0.99.3
- jms/translation-bundle: ~1.1.0
- knplabs/knp-gaufrette-bundle: ~0.3.0
- knplabs/knp-markdown-bundle: ~1.4.2
- lexik/translation-bundle: ~2.1.0
- liip/imagine-bundle: ~1.5.0
- liip/monitor-bundle: ~2.3.1
- malsup/form: ~3.36
- mnot/hinclude: 0.9.5.2
- oyejorge/less.php: ~1.7.0.2
- phing/phing: ~2.8.0
- propel/propel-bundle: ~1.2
- ptachoire/cssembed: ~1.0.2
- sensiolabs/security-checker: ~3.0
- smoya/asset-management-bundle: 1.0.1
- suncat/mobile-detect-bundle: ~0.10.3
- t1st3/famfamfam-flags: ~0.5.0
- twbs/bootstrap: ~3.2
- willdurand/propel-eventdispatcher-bundle: ~1.0.1
- willdurand/propel-publishable-behavior: ~1.2.0
- willdurand/propel-typehintable-behavior: ~1.0.4
- yzalis/identicon: ~1.1
Requires (Dev)
- willdurand/faker-bundle: ~1.0
This package is not auto-updated.
Last update: 2022-02-01 12:26:06 UTC
README
everything to quickstart a webpage
Because json is not a really handy format to read and it also lacks in commenting support, this Bundle supports the composer.yml format. composer-yaml.phar
is used, to convert from yml to json. In this manual all composer code snippets are in yml format. Create a script file, which call the yml to json converter before running composer. Make sure you
have both composer
and composer-yaml
commands at your fingertips.
Short Quick Manual
You can perform the whole installation by executing the following commands inside your empty project directory:
# Get sample composer file directly from github wget https://raw.githubusercontent.com/c33s/CoreBundle/master/Resources/files/composer-example.yml -O composer.yml --no-check-certificate # Modify composer.yml as needed. You may leave this for later. # Create empty composer.json touch composer.json # Convert composer.yml to json format. Do this every time you modify your composer.yml composer-yaml convert # Update dependencies without running any scripts. This may take a while. composer update --no-scripts # In the following commands, replace "YourNamespace" with your default Namespace prefix you want to use for this project's bundles. Keep it short but helpful. ./bin/init-symfony run YourNamespace # Now that the project structure is here it's time to run those fancy composer scripts composer run-script post-update-cmd # Init basic configuration php app/console c33s:init-config YourNamespace # Generate cms structure (webpage and admin bundles) php app/console c33s:init-cms YourNamespace # Optional: generate AdminGeneratorGenerator configuration that is automatically patched and correctly integrated into your project php app/console admin:c33s:build YourNamespace # This command will clear your cache and pre-render assets php app/console c33s:clean
Make sure the web server permissions are set up correctly. This includes the path for media uploads as well as the sqlite database used by default. See http://symfony.com/doc/master/book/installation.html#configuration-and-setup for further information.
You should enable web server writing for the following folders:
app/cache app/logs app/data web/media
If this goes well, you should see some example pages as well as a secured admin login when accessing /admin/.
Features
Propel Model Traits
A helper Trait which can be used to extend your propel model classes, to easily load data from your fixtures for 1:n relations. The data can be directly defined in the fixture file for the object which the data is related to.
By extending your class like this:
ACME/ModelBundle/YourPropelObject.php
class YourPropelObject extends BaseYourPropelObject
{
use \c33s\ModelBundle\Traits\PropelModelTraits;
public function setYourDataFromArray($data)
{
$properties = array
(
'model' => 'ACME\\ModelBundle\\Model\\YourExtraModel',
);
return $this->setRelationFromDataArray($data, $properties);
}
you can define fixtures like this:
app/propel/fixtures/yourfixtures.yml
ACME\ModelBundle\Model\YourPropelObject:
YourPropelObject_1:
# normal m:n relation fixtures
object_has_groups:
- Group_1
- Group_2
# load
your_data_from_array:
- name: your data name1
type: type1
- value: your data name2
type: type2