Solar Framework Shorts - Controlling form layout

Solars form system is pretty powerful and you realize the full beauty when auto generating forms directly from models but by default it uses a DL/DD/DT list for formatting your labels/inputs.

If your not a fan of that formatting you can do something about it, in my case I prefer the following

$config['Solar_View_Helper_Form']['decorator_tags'] = array(
            'list'  => 'div',
            'elem'  => 'div',
            'label' => null,
            'value' => null,
        );

But you can use any combination you choose.. Enjoy

Solar Framework Shorts - The Road to Solar 1.0

If you haven't taken a look at the Solar Framework in the past now is the time to do so as the three biggest complaints about Solar are on the road to be resolved.

Solar Framework Shorts - Using Jquery with Solar

When appropriate I will be publishing any code related to these shorts at sfer Solar Framework Extension Repository, all code and examples for this short can be found here.

When it comes to Jquery integration you have 2 main uses. Calling a php function from a website or calling Jquery functions from php both are done through an XMLHttpRequest

Solar Framework Shorts - Replicated MySQL for performance

You want to scale your Solar Framework application with minimal amount of work, one way to do this is to use Solars MysqlReplicated adapter. This adapter directs all SELECT related queries to the configured slaves, all other queries and transactions go the the master server.

Solar Framework Shorts - Model to Form the quick way

One of the great features of solar concerns auto creation of forms. Not only will Solar auto build a form based on a model record but it will also do basic formatting depending on filters.. For example if $item->states is validation using a list of states then the form generator will create a select box with that list of states to choose from.

Ok, so you now you know how great it is, lets get to the "Short" part of things

Solar Framework Shorts - Talk with the Solar Gods

This is one will be really short..

Solar Gods hang out on IRC – chat channel: #solar-talk at freenode.org

More ways to talk to them can be found

http://solarphp.org/discussion

Solar Framework Shorts - Top 10 reasons to use Solar

Here is a community built list with the top 10 most popular reasons to use Solar Framework, maybe if your not currently using Solar Framework one or two of these items will perk your interest up and get you to take a look.

Solar Framework Shorts - Basic Sql Profiling

This one is really short and simple

// load the Solar environment
require 'Solar.php';
Solar::start('/path/to/config/Solar.config.php');

// configure
$config = array(
    'adapter' => 'Solar_Sql_Adapter_Mysql',
    'host'    => '127.0.0.1',
    'user'    => 'username',
    'pass'    => 'password',
    'name'    => 'database_name',
);

// instantiate
$sql = Solar::factory('Solar_Sql', $config);

$sql->setProfiling(TRUE);

// Do a whole lot of SQL

print_r($sql->getProfile());

Solar Framework Shorts - Extending Solar's Page Controller

Solars manual has a getting started section that walks you through setting up a basic app, This app extends "Solar_Controller_Page" which handles a lot of the backend work for you.

As you get into your project you will find that pretty much every controller you have needs access to some basic structures and information, how can you ensure these are always available?

Solar Framework Shorts - Deleting caches

This one is simple but sweet, In your Models directory you define your Models and the basic rules they follow but do you know you can also make changes at the record level..

Syndicate content (C01 _th3me_)