Skip to content

Instantly share code, notes, and snippets.

View efpapado's full-sized avatar

Stathis [Efstathios] Papadopoulos efpapado

View GitHub Profile
diff --git a/src/Plugin/DsField/BundleField.php b/src/Plugin/DsField/BundleField.php
index 460cc62..ef9ff50 100644
--- a/src/Plugin/DsField/BundleField.php
+++ b/src/Plugin/DsField/BundleField.php
@@ -47,10 +47,8 @@ class BundleField extends DsFieldBase {
* {@inheritdoc}
*/
public function build() {
- $config = $this->getConfiguration();
$entity = $this->entity();
drush rsync LOCALPATH @SITEALIAS:REMOTEPATH
@efpapado
efpapado / db_sync.sh
Created October 13, 2016 06:53
db sync
drush @SITE sql-dump --gzip | zcat | drush sql-cli
pv sqlfile.sql | mysql -uxxx -pxxxx dbname
@efpapado
efpapado / tables_size.sql
Last active January 13, 2017 10:56
List tables by their size
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "___DB_NAME___"
ORDER BY (data_length + index_length) DESC;
-- Here's a query you can run to see the size per DB table:
SELECT
TABLE_SCHEMA,
@efpapado
efpapado / declaration_parent_compatibility.patch
Last active August 4, 2016 19:44
DS 8.x-2.x incompatibility on method declaration
diff --git a/src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php b/src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php
index d14d8a5..4c055fb 100644
--- a/src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php
+++ b/src/Plugin/views/Entity/Render/TranslationLanguageRenderer.php
@@ -58,7 +58,7 @@ class TranslationLanguageRenderer extends DefaultLanguageRenderer {
/**
* {@inheritdoc}
*/
- public function getLangcode(ResultRow $row) {
+ public function getLangcode(ResultRow $row, $relationship = NULL) {