This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \Concrete\Core\Area\Layout\Layout as AreaLayout; | |
use \Concrete\Block\CoreAreaLayout\Controller as CoreAreaLayout; | |
$a = new Area('area'); | |
$b = $a->getAreaBlocksArray($c); | |
$alid = $b[0]->instance->arLayoutID; | |
$ba = $b[0]->getBlockAreaObject(); | |
$bobj = $b[0]->instance->getBlockObject(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex index.html index.php | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^$ index.php [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^concrete5dir/ [NC] | |
RewriteRule ^(.*)$ /concrete5dir/$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ak = CollectionAttributeKey::getByHandle('attribute_handle'); | |
$atc = $ak->getController(); | |
if ($atc->attributeType->atHandle == 'select') { | |
$optionList = $atc->getOptions(); | |
if ($optionList->count() > 0) { | |
$options = $optionList->getOptions(); | |
var_dump($options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file_obj = File::getByID($file); | |
if($file_obj) { | |
$handles = array(); | |
foreach($file_obj->getThumbnails() as $ff){ | |
$handles[] = $ff->getThumbnailTypeVersionObject()->getHandle(); | |
} | |
if(in_array('thumb01', $handles)){ | |
$file_src = $file_obj->getThumbnailURL('thumb01'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sshpassコマンドが利用できること | |
# --deleteオプションはお好みで | |
#sshpass用のパスワード | |
SERVERPASS='sshpassword' | |
#除外ファイルを指定して纏める | |
EXCLUDE=("/config/database.php" "/files/") | |
for i in "${!EXCLUDE[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sync_db_sample | |
# リモートのDB同期とapplication/files取得 | |
# リモートでユーザーが投稿テストしつつ、各種設定も進めつつ、自分はmampで開発する、みたいな場合を想定 | |
# sshpassコマンドが利用できること | |
# mysqlコマンドが利用できること | |
# pvコマンドが利用できること(Pipe Viewerをインストール 進捗表示要らないのであれば不要) | |
#DBをリモードと同期 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ー へ | |
:eye::nose::eye: | |
) :lips:( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\ClassLoader\MapClassLoader; | |
defined('C5_EXECUTE') or die('Access Denied.'); | |
/** | |
* ---------------------------------------------------------------------------- | |
* Load all composer autoload items. | |
* ---------------------------------------------------------------------------- | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* =============================================== | |
@application/bootstrap/app.php | |
//for ajax | |
/endpoint/fav/{page_id} にアクセスすると、 | |
Application\Controller\FavクラスののsetFavoriteメソッドを実行 | |
{page_id}は引数、この場合はページIDを渡して処理に使ったりとか | |
URLのルールとかできることはsymfonyのドキュメントとかで | |
=============================================== */ |
OlderNewer